v4.0.0 - major release
This commit is contained in:
parent
a875d8b259
commit
853c496d2d
34
LabelStoreMax/.env
Normal file
34
LabelStoreMax/.env
Normal file
@ -0,0 +1,34 @@
|
||||
# *<! ------ App ------!>*
|
||||
|
||||
APP_NAME="MyApp"
|
||||
APP_ENV="local"
|
||||
APP_DEBUG="true"
|
||||
APP_URL="https://mywoocommercestore.com"
|
||||
|
||||
ASSET_PATH_PUBLIC="public/assets/"
|
||||
ASSET_PATH_IMAGES="public/assets/images"
|
||||
TIMEZONE="UTC"
|
||||
DEFAULT_LOCALE="en"
|
||||
|
||||
# *<! ------ WooSignal Config ------!>*
|
||||
|
||||
APP_KEY="your app key"
|
||||
# App key from WooSignal link: https://woosignal.com/dashboard/apps
|
||||
|
||||
# *<! ------ STRIPE (OPTIONAL) ------!>*
|
||||
|
||||
STRIPE_ACCOUNT="Stripe account key from WooSignal"
|
||||
# Stripe account key from WooSignal https://woosignal.com/dashboard
|
||||
|
||||
STRIPE_LIVE_MODE="false"
|
||||
# Change to 'true' for live payments and update the "Environment for Stripe" here https://woosignal.com/dashboard
|
||||
|
||||
# *<! ------ RAYZORPAY (OPTIONAL) ------!>*
|
||||
|
||||
RAZORPAY_ID=""
|
||||
# Razorpay ID from https://razorpay.com
|
||||
|
||||
# *<! ------ EXTRAS ------!>*
|
||||
|
||||
PRODUCT_PLACEHOLDER_IMAGE="https://woosignal.com/images/woocommerce-placeholder.png"
|
||||
# Sets the default placeholder image for products with no image
|
||||
@ -1,3 +1,15 @@
|
||||
## [4.0.0] - 2020-03-28
|
||||
|
||||
* Major release
|
||||
* New config structure
|
||||
* Dark mode added
|
||||
* Menu drawer added
|
||||
* Project refactor to use Nylo Framework
|
||||
* Performance boost
|
||||
* Bug fixes
|
||||
* Dart code formatted
|
||||
* Pubspec.yaml dependency updates
|
||||
|
||||
## [3.0.0] - 2020-03-08
|
||||
|
||||
* Major release
|
||||
|
||||
25
LabelStoreMax/LICENSE
Normal file
25
LabelStoreMax/LICENSE
Normal file
@ -0,0 +1,25 @@
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2021, WooSignal Ltd
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ -1,30 +1,60 @@
|
||||
# label_storemax
|
||||
<p align="center">
|
||||
<img width="200" height="125" src="https://woosignal.com/images/woosignal_logo_stripe_blue.png" alt="WooSignal logo">
|
||||
</p>
|
||||
|
||||
LabelStoreMAX
|
||||
Created by Anthony Gordon.
|
||||
# WooCommerce App: Label StoreMax
|
||||
|
||||
[Official WooSignal App Template](https://woosignal.com)
|
||||
### Label StoreMax - v4.0.0
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Connect your WooCommerce store
|
||||
Click connect above to link your WooCommerce store to our site, all you'll need to do is add your url to provide WooSignal access.
|
||||
[Official WooSignal WooCommerce App](https://woosignal.com)
|
||||
|
||||
2. Generate an AppKey for the app
|
||||
Next go to [manage apps page](https://woosignal.com/dashboard/apps) and click "Generate new key" for your app and copy it to somewhere safe, it's important that you don't share is with anyone.
|
||||

|
||||
|
||||
3. Add the AppKey to the project
|
||||
Look for the labelconfig.dart file and change the AppKey to the one your generated.
|
||||

|
||||
|
||||
4. Build and run the app
|
||||
If you have done all of the above you should have a basic setup to get started, you'll see products from your WooCommerce store appearing in the app.
|
||||

|
||||
|
||||
5. Uploading to the App Store/Google Play Store?
|
||||
Uploading your app release to IOS [IOS guide](https://flutter.dev/docs/deployment/ios)
|
||||

|
||||
|
||||
Uploading your app release to Android [Android guide](https://flutter.dev/docs/deployment/android)
|
||||
### About Label StoreMax
|
||||
|
||||
## Need help uploading the app?
|
||||
Check out our YouTube series to help you with uploading the app and other tips
|
||||
Label StoreMax is an App Template for WooCommerce stores. Your customers will be able to browse products, make orders and login via WordPress. You can also customise the look and feel of the app in the WooSignal dashboard.
|
||||
|
||||
[Support](https://woosignal.com/support)
|
||||
You can also upload the app to the IOS app store and Google play store using Flutter.
|
||||
|
||||
### Requirements
|
||||
|
||||
- WooCommerce Store 3.5+
|
||||
- Android Studio/VSCode (for running the app)
|
||||
- Flutter installed
|
||||
|
||||
### Getting Started
|
||||
|
||||
1. Download/Clone this repository
|
||||
2. Sign up for free on [WooSignal](https://woosignal.com) and link your WooCommerce store
|
||||
3. Add your app key into the **.env** file and hit play (with Android Studio) to build the app 🥳
|
||||
|
||||
Full documentation this available [here](https://woosignal.com/docs/app/ios/label-storemax)
|
||||
|
||||
## Some features integrated
|
||||
|
||||
- App Store Ready
|
||||
- Simple configuration
|
||||
- Browse products, make orders, customer login (via WordPress)
|
||||
- Change app name, logo, customize default language, currency + more
|
||||
- Light and dark mode
|
||||
- Stripe, Cash On Delivery, RazorPay
|
||||
- Localized for en, es, pt, it, hi, fr
|
||||
- Orders show as normal in WooCommerce
|
||||
|
||||
## Security Vulnerabilities
|
||||
If you discover a security vulnerability within WooSignal, please send an e-mail support@woosignal.com
|
||||
|
||||
## Uploading to the app stores
|
||||
|
||||
- [IOS - Deployment](https://flutter.dev/docs/deployment/ios)
|
||||
- [Android - Deployment](https://flutter.dev/docs/deployment/android)
|
||||
|
||||
## Licence
|
||||
The Label StoreMax framework is open-sourced software licensed under the MIT license.
|
||||
|
||||
@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
compileSdkVersion 28
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
@ -50,13 +50,6 @@ android {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
|
||||
// Uncomment "signingConfig signingConfigs.release"
|
||||
// Remove "signingConfig signingConfigs.debug"
|
||||
// When you're ready to build for release
|
||||
// Also check out https://flutter.dev/docs/deployment/android
|
||||
// Set the key.properties when building apk or appbundle
|
||||
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
@ -68,5 +61,5 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
}
|
||||
implementation "androidx.multidex:multidex:2.0.1"
|
||||
}
|
||||
@ -58,4 +58,4 @@
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
||||
</manifest>
|
||||
@ -1,4 +1,4 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.enableR8=true
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.enableR8=true
|
||||
|
||||
3
LabelStoreMax/apispec.json
Normal file
3
LabelStoreMax/apispec.json
Normal file
@ -0,0 +1,3 @@
|
||||
[
|
||||
|
||||
]
|
||||
@ -1,93 +0,0 @@
|
||||
Copyright (c) 2016 by Red Hat, Inc. All rights reserved.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,93 +0,0 @@
|
||||
Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32
LabelStoreMax/ios/.gitignore
vendored
Normal file
32
LabelStoreMax/ios/.gitignore
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
||||
@ -1 +1 @@
|
||||
5b271ab1c6a17b054237577340baf791
|
||||
ed7b4bd8f32e5ea11f5ee09951e3fca9
|
||||
@ -2,25 +2,25 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>13.00</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@ -3,18 +3,17 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
D86A9FCC0FDE40E749D2F6CC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41358261A3745FB464B72CE9 /* Pods_Runner.framework */; };
|
||||
BC760DE05EE229D80D672CAC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 320EF84A9034996DB0DD16A0 /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@ -31,15 +30,15 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0CCBA7AF2BAD9552DF0067C7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
1BA921103C32B79944361E71 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
320EF84A9034996DB0DD16A0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
41358261A3745FB464B72CE9 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
87F77F819B61E54C61672D11 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
857C6B0641385D9A8CF0C7D1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@ -47,7 +46,7 @@
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
E107F71D46A779B424A08899 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
DF4BE73D09DD6B58A2617025 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -55,21 +54,13 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D86A9FCC0FDE40E749D2F6CC /* Pods_Runner.framework in Frameworks */,
|
||||
BC760DE05EE229D80D672CAC /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3E3E1C811B47477CF4A9A315 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
41358261A3745FB464B72CE9 /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -87,8 +78,8 @@
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
A759088B62C60268D25F841F /* Pods */,
|
||||
3E3E1C811B47477CF4A9A315 /* Frameworks */,
|
||||
B6D068D2059A697428792520 /* Pods */,
|
||||
C6C43B1429552E4F1EDF143D /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@ -107,7 +98,6 @@
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
97C146F11CF9000F007C117D /* Supporting Files */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
@ -116,23 +106,24 @@
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F11CF9000F007C117D /* Supporting Files */ = {
|
||||
B6D068D2059A697428792520 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A759088B62C60268D25F841F /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E107F71D46A779B424A08899 /* Pods-Runner.debug.xcconfig */,
|
||||
87F77F819B61E54C61672D11 /* Pods-Runner.release.xcconfig */,
|
||||
1BA921103C32B79944361E71 /* Pods-Runner.profile.xcconfig */,
|
||||
0CCBA7AF2BAD9552DF0067C7 /* Pods-Runner.debug.xcconfig */,
|
||||
857C6B0641385D9A8CF0C7D1 /* Pods-Runner.release.xcconfig */,
|
||||
DF4BE73D09DD6B58A2617025 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6C43B1429552E4F1EDF143D /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
320EF84A9034996DB0DD16A0 /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -140,14 +131,14 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
7A4371A0EF7EDBC9E03FB2D7 /* [CP] Check Pods Manifest.lock */,
|
||||
C132651D93B0648B694CECED /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
C10A9485E174060F4694B3D0 /* [CP] Embed Pods Frameworks */,
|
||||
BEC85B489BA218F6E1950BBC /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -165,16 +156,16 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "The Chromium Authors";
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 0910;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
@ -198,7 +189,6 @@
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
@ -219,9 +209,40 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin\n";
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
7A4371A0EF7EDBC9E03FB2D7 /* [CP] Check Pods Manifest.lock */ = {
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
BEC85B489BA218F6E1950BBC /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
C132651D93B0648B694CECED /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@ -243,64 +264,6 @@
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
|
||||
};
|
||||
C10A9485E174060F4694B3D0 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/Stripe/Stripe.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/device_info/device_info.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/flutter_money_formatter/flutter_money_formatter.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/flutter_web_browser/flutter_web_browser.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/hexcolor/hexcolor.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
|
||||
"${PODS_ROOT}/razorpay-pod/Pod/Razorpay.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/razorpay_flutter/razorpay_flutter.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/woosignal_stripe/woosignal_stripe.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Stripe.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_money_formatter.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_web_browser.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hexcolor.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Razorpay.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/razorpay_flutter.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/woosignal_stripe.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@ -379,6 +342,7 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
@ -398,16 +362,18 @@
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.woosignal.label-StoreMax";
|
||||
PRODUCT_NAME = Runner;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
@ -512,7 +478,9 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
@ -532,17 +500,19 @@
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.woosignal.label-StoreMax";
|
||||
PRODUCT_NAME = Runner;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
@ -562,16 +532,18 @@
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.woosignal.label-StoreMax";
|
||||
PRODUCT_NAME = Runner;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -27,6 +27,8 @@
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
@ -36,8 +38,8 @@
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@ -59,6 +61,8 @@
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -3,7 +3,6 @@ import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
@ -11,5 +10,4 @@ import Flutter
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -174,5 +174,7 @@
|
||||
"for": "zum",
|
||||
"Buy Product": "Produkt kaufen",
|
||||
"Retry": "Wiederholen",
|
||||
"Retry later": "Versuchen Sie es später erneut"
|
||||
"Retry later": "Versuchen Sie es später erneut",
|
||||
"Light Mode": "Lichtmodus",
|
||||
"Dark Mode": "Dunkler Modus"
|
||||
}
|
||||
@ -174,5 +174,7 @@
|
||||
"for": "for",
|
||||
"Buy Product": "Buy Product",
|
||||
"Retry": "Retry",
|
||||
"Retry later": "Retry later"
|
||||
"Retry later": "Retry later",
|
||||
"Light Mode": "Light Mode",
|
||||
"Dark Mode": "Dark Mode"
|
||||
}
|
||||
@ -174,5 +174,7 @@
|
||||
"for": "para",
|
||||
"Buy Product": "Comprar producto",
|
||||
"Retry": "Rever",
|
||||
"Retry later": "Reintentar más tarde"
|
||||
"Retry later": "Reintentar más tarde",
|
||||
"Light Mode": "Modo de luz",
|
||||
"Dark Mode": "Modo oscuro"
|
||||
}
|
||||
@ -174,5 +174,7 @@
|
||||
"for": "pour",
|
||||
"Buy Product": "Acheter un produit",
|
||||
"Retry": "Recommencez",
|
||||
"Retry later": "Réessayer plus tard"
|
||||
"Retry later": "Réessayer plus tard",
|
||||
"Light Mode": "Mode lumière",
|
||||
"Dark Mode": "Mode sombre"
|
||||
}
|
||||
@ -174,5 +174,7 @@
|
||||
"for": "ke liye",
|
||||
"Buy Product": "utpaad khareeden",
|
||||
"Retry": "pun: prayaas karen",
|
||||
"Retry later": "baad mein pun: prayaas karen"
|
||||
"Retry later": "baad mein pun: prayaas karen",
|
||||
"Light Mode": "lait mod",
|
||||
"Dark Mode": "daark mod"
|
||||
}
|
||||
@ -174,5 +174,7 @@
|
||||
"for": "per",
|
||||
"Buy Product": "Acquista prodotto",
|
||||
"Retry": "Riprova",
|
||||
"Retry later": "Riprova più tardi"
|
||||
"Retry later": "Riprova più tardi",
|
||||
"Light Mode": "Modalità luce",
|
||||
"Dark Mode": "Modalità scura"
|
||||
}
|
||||
@ -174,5 +174,7 @@
|
||||
"for": "para",
|
||||
"Buy Product": "Comprar Produto",
|
||||
"Retry": "Tentar novamente",
|
||||
"Retry later": "Tentar mais tarde"
|
||||
"Retry later": "Tentar mais tarde",
|
||||
"Light Mode": "Modo de luz",
|
||||
"Dark Mode": "Modo escuro"
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -8,10 +8,10 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'controller.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
Widget showAppLoader() {
|
||||
return SpinKitDoubleBounce(color: HexColor("#393318"));
|
||||
class AccountOrderDetailController extends Controller {
|
||||
@override
|
||||
construct(BuildContext context) {}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'controller.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class BrowseCategoryController extends Controller {
|
||||
@override
|
||||
construct(BuildContext context) {}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'controller.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class BrowseSearchController extends Controller {
|
||||
@override
|
||||
construct(BuildContext context) {}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'controller.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class CheckoutStatusController extends Controller {
|
||||
@override
|
||||
construct(BuildContext context) {}
|
||||
}
|
||||
17
LabelStoreMax/lib/app/controllers/controller.dart
Normal file
17
LabelStoreMax/lib/app/controllers/controller.dart
Normal file
@ -0,0 +1,17 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:nylo_framework/controllers/controller.dart';
|
||||
|
||||
/// Base Controller for the Nylo
|
||||
/// See more on controllers here - https://nylo.dev/docs/1.x/controllers
|
||||
class Controller extends BaseController {
|
||||
Controller();
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
|
||||
import 'controller.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class ProductDetailController extends Controller {
|
||||
@override
|
||||
construct(BuildContext context) {}
|
||||
|
||||
viewExternalProduct(Product product) {
|
||||
if (product.externalUrl != null && product.externalUrl.isNotEmpty) {
|
||||
openBrowserTab(url: product.externalUrl);
|
||||
}
|
||||
}
|
||||
|
||||
viewProductImages(int i, Product product) =>
|
||||
Navigator.pushNamed(context, "/product-images", arguments: {
|
||||
"index": i,
|
||||
"images": product.images.map((f) => f.src).toList()
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'controller.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class ProductImageViewerController extends Controller {
|
||||
@override
|
||||
construct(BuildContext context) {}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:label_storemax/models/customer_address.dart';
|
||||
import 'package:flutter_app/app/models/customer_address.dart';
|
||||
|
||||
class BillingDetails {
|
||||
CustomerAddress billingAddress;
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -11,58 +11,60 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:label_storemax/helpers/app_helper.dart';
|
||||
import 'package:label_storemax/helpers/shared_pref.dart';
|
||||
import 'package:label_storemax/models/cart_line_item.dart';
|
||||
import 'package:label_storemax/models/checkout_session.dart';
|
||||
import 'package:label_storemax/models/shipping_type.dart';
|
||||
import 'package:flutter_app/app/models/cart_line_item.dart';
|
||||
import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
import 'package:flutter_app/app/models/shipping_type.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/shared_key.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
import 'package:woosignal/models/response/shipping_method.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
|
||||
import '../helpers/tools.dart';
|
||||
|
||||
class Cart {
|
||||
String _keyCart = "CART_SESSION";
|
||||
|
||||
Cart._privateConstructor();
|
||||
static final Cart getInstance = Cart._privateConstructor();
|
||||
|
||||
Future<List<CartLineItem>> getCart() async {
|
||||
List<CartLineItem> cartLineItems = [];
|
||||
SharedPref sharedPref = SharedPref();
|
||||
String currentCartArrJSON = (await sharedPref.read(_keyCart) as String);
|
||||
if (currentCartArrJSON == null) {
|
||||
cartLineItems = [];
|
||||
} else {
|
||||
String currentCartArrJSON = await NyStorage.read(SharedKey.cart);
|
||||
|
||||
if (currentCartArrJSON != null) {
|
||||
cartLineItems = (jsonDecode(currentCartArrJSON) as List<dynamic>)
|
||||
.map((i) => CartLineItem.fromJson(i))
|
||||
.toList();
|
||||
}
|
||||
|
||||
return cartLineItems;
|
||||
}
|
||||
|
||||
void addToCart({@required CartLineItem cartLineItem}) async {
|
||||
Future addToCart({@required CartLineItem cartLineItem}) async {
|
||||
List<CartLineItem> cartLineItems = await getCart();
|
||||
|
||||
if (cartLineItem.variationId != null) {
|
||||
if (cartLineItems.firstWhere(
|
||||
(i) => (i.productId == cartLineItem.productId &&
|
||||
i.variationId == cartLineItem.variationId),
|
||||
orElse: () => null) !=
|
||||
null) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
CartLineItem firstCartItem = cartLineItems.firstWhere(
|
||||
(i) => i.productId == cartLineItem.productId,
|
||||
orElse: () => null);
|
||||
if (firstCartItem != null) {
|
||||
return;
|
||||
}
|
||||
if (cartLineItem.variationId != null &&
|
||||
cartLineItems.firstWhere(
|
||||
(i) => (i.productId == cartLineItem.productId &&
|
||||
i.variationId == cartLineItem.variationId &&
|
||||
i.variationOptions == cartLineItem.variationOptions),
|
||||
orElse: () => null) !=
|
||||
null) {
|
||||
cartLineItems.removeWhere((item) =>
|
||||
item.productId == cartLineItem.productId &&
|
||||
item.variationId == cartLineItem.variationId &&
|
||||
item.variationOptions == cartLineItem.variationOptions);
|
||||
}
|
||||
|
||||
if (cartLineItem.variationId == null &&
|
||||
cartLineItems.firstWhere((i) => i.productId == cartLineItem.productId,
|
||||
orElse: () => null) !=
|
||||
null) {
|
||||
cartLineItems
|
||||
.removeWhere((item) => item.productId == cartLineItem.productId);
|
||||
}
|
||||
|
||||
cartLineItems.add(cartLineItem);
|
||||
|
||||
saveCartToPref(cartLineItems: cartLineItems);
|
||||
await saveCartToPref(cartLineItems: cartLineItems);
|
||||
}
|
||||
|
||||
Future<String> getTotal({bool withFormat = false}) async {
|
||||
@ -90,7 +92,7 @@ class Cart {
|
||||
return subtotal.toStringAsFixed(2);
|
||||
}
|
||||
|
||||
void updateQuantity(
|
||||
updateQuantity(
|
||||
{@required CartLineItem cartLineItem,
|
||||
@required int incrementQuantity}) async {
|
||||
List<CartLineItem> cartLineItems = await getCart();
|
||||
@ -104,7 +106,7 @@ class Cart {
|
||||
}
|
||||
tmpCartItem.add(cartItem);
|
||||
});
|
||||
saveCartToPref(cartLineItems: tmpCartItem);
|
||||
await saveCartToPref(cartLineItems: tmpCartItem);
|
||||
}
|
||||
|
||||
Future<String> cartShortDesc() async {
|
||||
@ -116,25 +118,17 @@ class Cart {
|
||||
.join(",");
|
||||
}
|
||||
|
||||
void removeCartItemForIndex({@required int index}) async {
|
||||
removeCartItemForIndex({@required int index}) async {
|
||||
List<CartLineItem> cartLineItems = await getCart();
|
||||
cartLineItems.removeAt(index);
|
||||
saveCartToPref(cartLineItems: cartLineItems);
|
||||
await saveCartToPref(cartLineItems: cartLineItems);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
List<CartLineItem> cartLineItems = [];
|
||||
String jsonArrCartItems =
|
||||
jsonEncode(cartLineItems.map((i) => i.toJson()).toList());
|
||||
sharedPref.save(_keyCart, jsonArrCartItems);
|
||||
}
|
||||
clear() async => NyStorage.delete(SharedKey.cart);
|
||||
|
||||
void saveCartToPref({@required List<CartLineItem> cartLineItems}) {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
String jsonArrCartItems =
|
||||
jsonEncode(cartLineItems.map((i) => i.toJson()).toList());
|
||||
sharedPref.save(_keyCart, jsonArrCartItems);
|
||||
saveCartToPref({@required List<CartLineItem> cartLineItems}) async {
|
||||
String json = jsonEncode(cartLineItems.map((i) => i.toJson()).toList());
|
||||
await NyStorage.store(SharedKey.cart, json);
|
||||
}
|
||||
|
||||
Future<String> taxAmount(TaxRate taxRate) async {
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
|
||||
class CartLineItem {
|
||||
String name;
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -9,20 +9,17 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:label_storemax/helpers/shared_pref.dart';
|
||||
import 'package:label_storemax/models/billing_details.dart';
|
||||
import 'package:label_storemax/models/cart.dart';
|
||||
import 'package:label_storemax/models/customer_address.dart';
|
||||
import 'package:label_storemax/models/payment_type.dart';
|
||||
import 'package:label_storemax/models/shipping_type.dart';
|
||||
import 'package:flutter_app/app/models/billing_details.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
import 'package:flutter_app/app/models/customer_address.dart';
|
||||
import 'package:flutter_app/app/models/payment_type.dart';
|
||||
import 'package:flutter_app/app/models/shipping_type.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/shared_key.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
|
||||
import '../helpers/tools.dart';
|
||||
|
||||
class CheckoutSession {
|
||||
String sfKeyBillingCheckout = "CS_BILLING_DETAILS";
|
||||
String sfKeyShippingCheckout = "CS_SHIPPING_DETAILS";
|
||||
bool shipToDifferentAddress = false;
|
||||
|
||||
CheckoutSession._privateConstructor();
|
||||
@ -44,8 +41,7 @@ class CheckoutSession {
|
||||
paymentType = null;
|
||||
}
|
||||
|
||||
void saveBillingAddress() {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
void saveBillingAddress() async {
|
||||
CustomerAddress customerAddress =
|
||||
CheckoutSession.getInstance.billingDetails.billingAddress;
|
||||
|
||||
@ -54,13 +50,12 @@ class CheckoutSession {
|
||||
}
|
||||
|
||||
String billingAddress = jsonEncode(customerAddress.toJson());
|
||||
sharedPref.save(sfKeyBillingCheckout, billingAddress);
|
||||
await NyStorage.store(SharedKey.customerBillingDetails, billingAddress);
|
||||
}
|
||||
|
||||
Future<CustomerAddress> getBillingAddress() async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
|
||||
String strCheckoutDetails = await sharedPref.read(sfKeyBillingCheckout);
|
||||
String strCheckoutDetails =
|
||||
await NyStorage.read(SharedKey.customerBillingDetails);
|
||||
|
||||
if (strCheckoutDetails != null && strCheckoutDetails != "") {
|
||||
return CustomerAddress.fromJson(jsonDecode(strCheckoutDetails));
|
||||
@ -68,37 +63,30 @@ class CheckoutSession {
|
||||
return null;
|
||||
}
|
||||
|
||||
void clearBillingAddress() {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
sharedPref.remove(sfKeyBillingCheckout);
|
||||
}
|
||||
void clearBillingAddress() async =>
|
||||
await NyStorage.delete(SharedKey.customerBillingDetails);
|
||||
|
||||
void saveShippingAddress() {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
saveShippingAddress() async {
|
||||
CustomerAddress customerAddress =
|
||||
CheckoutSession.getInstance.billingDetails.shippingAddress;
|
||||
|
||||
if (customerAddress == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String shippingAddress = jsonEncode(customerAddress.toJson());
|
||||
sharedPref.save(sfKeyShippingCheckout, shippingAddress);
|
||||
await NyStorage.store(SharedKey.customerShippingDetails, shippingAddress);
|
||||
}
|
||||
|
||||
Future<CustomerAddress> getShippingAddress() async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
String strCheckoutDetails = await sharedPref.read(sfKeyShippingCheckout);
|
||||
String strCheckoutDetails =
|
||||
await NyStorage.read(SharedKey.customerShippingDetails);
|
||||
if (strCheckoutDetails != null && strCheckoutDetails != "") {
|
||||
return CustomerAddress.fromJson(jsonDecode(strCheckoutDetails));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void clearShippingAddress() {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
sharedPref.remove(sfKeyShippingCheckout);
|
||||
}
|
||||
void clearShippingAddress() async =>
|
||||
NyStorage.delete(SharedKey.customerShippingDetails);
|
||||
|
||||
Future<String> total({bool withFormat = false, TaxRate taxRate}) async {
|
||||
double totalCart = parseWcPrice(await Cart.getInstance.getTotal());
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:label_storemax/models/customer_country.dart';
|
||||
import 'package:flutter_app/app/models/customer_country.dart';
|
||||
|
||||
class CustomerAddress {
|
||||
String firstName;
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:label_storemax/models/default_shipping.dart';
|
||||
import 'package:flutter_app/app/models/default_shipping.dart';
|
||||
|
||||
class CustomerCountry {
|
||||
String countryCode;
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -9,10 +9,9 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:woosignal/models/response/shipping_method.dart';
|
||||
|
||||
import '../helpers/tools.dart';
|
||||
|
||||
class ShippingType {
|
||||
String methodId;
|
||||
String cost;
|
||||
28
LabelStoreMax/lib/app/models/user.dart
Normal file
28
LabelStoreMax/lib/app/models/user.dart
Normal file
@ -0,0 +1,28 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
|
||||
class User extends Storable {
|
||||
String userId;
|
||||
String token;
|
||||
|
||||
User();
|
||||
User.fromUserAuthResponse({this.userId, this.token});
|
||||
|
||||
@override
|
||||
toStorage() => {"token": this.token, "user_id": this.userId};
|
||||
|
||||
@override
|
||||
fromStorage(dynamic data) {
|
||||
this.token = data['token'];
|
||||
this.userId = data['user_id'];
|
||||
}
|
||||
}
|
||||
13
LabelStoreMax/lib/app/networking/api_service.dart
Normal file
13
LabelStoreMax/lib/app/networking/api_service.dart
Normal file
@ -0,0 +1,13 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:nylo_framework/networking/base_networking.dart';
|
||||
|
||||
class ApiService extends BaseApi {}
|
||||
@ -1,6 +1,6 @@
|
||||
//
|
||||
// LabelCore
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -12,9 +12,10 @@
|
||||
//
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:label_storemax/helpers/data/order_wc.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/pages/checkout_confirmation.dart';
|
||||
import 'package:flutter_app/bootstrap/data/order_wc.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/pages/checkout_confirmation.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
@ -37,7 +38,7 @@ cashOnDeliveryPay(context,
|
||||
);
|
||||
state.reloadState(showLoader: false);
|
||||
}
|
||||
} catch (ex) {
|
||||
} catch (_) {
|
||||
showEdgeAlertWith(
|
||||
context,
|
||||
title: trans(context, "Error"),
|
||||
@ -1,6 +1,6 @@
|
||||
//
|
||||
// LabelCore
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -12,10 +12,10 @@
|
||||
//
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:label_storemax/helpers/data/order_wc.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/models/cart.dart';
|
||||
import 'package:label_storemax/pages/checkout_confirmation.dart';
|
||||
import 'package:flutter_app/bootstrap/data/order_wc.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/pages/checkout_confirmation.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
@ -1,6 +1,6 @@
|
||||
//
|
||||
// LabelCore
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -12,11 +12,11 @@
|
||||
//
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:label_storemax/helpers/app_helper.dart';
|
||||
import 'package:label_storemax/helpers/data/order_wc.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/labelconfig.dart';
|
||||
import 'package:label_storemax/pages/checkout_confirmation.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/data/order_wc.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/pages/checkout_confirmation.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
import 'package:razorpay_flutter/razorpay_flutter.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
@ -70,7 +70,7 @@ razorPay(context,
|
||||
// CHECKOUT HELPER
|
||||
await checkout(taxRate, (total, billingDetails, cart) async {
|
||||
var options = {
|
||||
'key': app_razor_id,
|
||||
'key': getEnv('RAZORPAY_ID'),
|
||||
'amount': (parseWcPrice(total) * 100).toInt(),
|
||||
'name': AppHelper.instance.appConfig.appName,
|
||||
'description': await cart.cartShortDesc(),
|
||||
@ -1,6 +1,6 @@
|
||||
//
|
||||
// LabelCore
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -13,23 +13,31 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:label_storemax/helpers/data/order_wc.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/labelconfig.dart';
|
||||
import 'package:label_storemax/pages/checkout_confirmation.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/data/order_wc.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/pages/checkout_confirmation.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
import 'package:woosignal_stripe/woosignal_stripe.dart';
|
||||
|
||||
stripePay(context,
|
||||
{@required CheckoutConfirmationPageState state, TaxRate taxRate}) async {
|
||||
try {
|
||||
WooSignalApp wooSignalApp = AppHelper.instance.appConfig;
|
||||
bool liveMode = getEnv('STRIPE_LIVE_MODE') == null
|
||||
? wooSignalApp.stripeLiveMode
|
||||
: getEnv('STRIPE_LIVE_MODE', defaultValue: false);
|
||||
|
||||
// CONFIGURE STRIPE
|
||||
FlutterStripePayment.setStripeSettings(
|
||||
stripeAccount: app_stripe_account, liveMode: app_stripe_live_mode);
|
||||
stripeAccount: getEnv('STRIPE_ACCOUNT'), liveMode: liveMode);
|
||||
|
||||
var paymentResponse = await FlutterStripePayment.addPaymentMethod();
|
||||
PaymentResponse paymentResponse =
|
||||
await FlutterStripePayment.addPaymentMethod();
|
||||
|
||||
// CHECK STATUS FROM STRIPE
|
||||
if (paymentResponse.status == PaymentResponseStatus.succeeded) {
|
||||
@ -90,8 +98,8 @@ stripePay(context,
|
||||
state.reloadState(showLoader: false);
|
||||
}
|
||||
} else if (intentResponse.status == PaymentResponseStatus.failed) {
|
||||
if (app_debug) {
|
||||
print(intentResponse.errorMessage);
|
||||
if (getEnv('APP_DEBUG', defaultValue: true)) {
|
||||
NyLogger.error(intentResponse.errorMessage);
|
||||
}
|
||||
showEdgeAlertWith(
|
||||
context,
|
||||
@ -1,61 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/models/payment_type.dart';
|
||||
import 'package:label_storemax/providers/cash_on_delivery.dart';
|
||||
import 'package:label_storemax/providers/razor_pay.dart';
|
||||
import 'package:label_storemax/providers/stripe_pay.dart';
|
||||
|
||||
// Payment methods available for uses in the app
|
||||
|
||||
List<PaymentType> arrPaymentMethods = [
|
||||
addPayment(
|
||||
PaymentType(
|
||||
id: 1,
|
||||
name: "Stripe",
|
||||
desc: "Debit or Credit Card",
|
||||
assetImage: "dark_powered_by_stripe.png",
|
||||
pay: stripePay,
|
||||
),
|
||||
),
|
||||
|
||||
addPayment(
|
||||
PaymentType(
|
||||
id: 2,
|
||||
name: "CashOnDelivery",
|
||||
desc: "Cash on delivery",
|
||||
assetImage: "cash_on_delivery.jpeg",
|
||||
pay: cashOnDeliveryPay,
|
||||
),
|
||||
),
|
||||
|
||||
addPayment(
|
||||
PaymentType(
|
||||
id: 3,
|
||||
name: "RazorPay",
|
||||
desc: "Debit or Credit Card",
|
||||
assetImage: "razorpay.png",
|
||||
pay: razorPay,
|
||||
),
|
||||
),
|
||||
|
||||
// e.g. add more here
|
||||
|
||||
// addPayment(
|
||||
// PaymentType(
|
||||
// id: 4,
|
||||
// name: "MyNewPaymentMethod",
|
||||
// desc: "Debit or Credit Card",
|
||||
// assetImage: "add icon image to assets/images/myimage.png",
|
||||
// pay: myCustomPaymentFunction
|
||||
// ),
|
||||
// ),
|
||||
].where((e) => e != null).toList();
|
||||
118
LabelStoreMax/lib/bootstrap/app.dart
Normal file
118
LabelStoreMax/lib/bootstrap/app.dart
Normal file
@ -0,0 +1,118 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:nylo_framework/localization/app_localization.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppBuild extends StatelessWidget {
|
||||
final String initialRoute;
|
||||
Brightness defaultBrightness;
|
||||
ThemeData themeData;
|
||||
ThemeData darkTheme;
|
||||
Locale locale;
|
||||
String title;
|
||||
bool debugShowCheckedModeBanner;
|
||||
bool debugShowMaterialGrid;
|
||||
bool showPerformanceOverlay;
|
||||
bool checkerboardRasterCacheImages;
|
||||
bool checkerboardOffscreenLayers;
|
||||
bool showSemanticsDebugger;
|
||||
Map<LogicalKeySet, Intent> shortcuts;
|
||||
Map<Type, Action<Intent>> actions;
|
||||
List<Locale> supportedLocales;
|
||||
ThemeMode themeMode;
|
||||
Color color;
|
||||
GenerateAppTitle onGenerateTitle;
|
||||
TransitionBuilder builder;
|
||||
List<NavigatorObserver> navigatorObservers;
|
||||
RouteFactory onUnknownRoute;
|
||||
InitialRouteListFactory onGenerateInitialRoutes;
|
||||
GlobalKey<NavigatorState> navigatorKey;
|
||||
|
||||
final Route<dynamic> Function(RouteSettings settings) onGenerateRoute;
|
||||
|
||||
AppBuild({
|
||||
Key key,
|
||||
this.initialRoute,
|
||||
this.title,
|
||||
this.defaultBrightness,
|
||||
this.locale,
|
||||
this.themeData,
|
||||
this.onGenerateRoute,
|
||||
this.navigatorKey,
|
||||
this.onGenerateInitialRoutes,
|
||||
this.onUnknownRoute,
|
||||
this.navigatorObservers = const <NavigatorObserver>[],
|
||||
this.builder,
|
||||
this.onGenerateTitle,
|
||||
this.color,
|
||||
this.darkTheme,
|
||||
this.themeMode = ThemeMode.system,
|
||||
this.supportedLocales = const <Locale>[Locale('en', 'US')],
|
||||
this.debugShowMaterialGrid = false,
|
||||
this.showPerformanceOverlay = false,
|
||||
this.checkerboardRasterCacheImages = false,
|
||||
this.checkerboardOffscreenLayers = false,
|
||||
this.showSemanticsDebugger = false,
|
||||
this.debugShowCheckedModeBanner = true,
|
||||
this.shortcuts,
|
||||
this.actions,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AdaptiveTheme(
|
||||
light: themeData,
|
||||
dark: darkTheme,
|
||||
initial: AdaptiveThemeMode.light,
|
||||
builder: (theme, darkTheme) => ValueListenableBuilder(
|
||||
valueListenable: ValueNotifier(locale),
|
||||
builder: (context, Locale locale, _) => MaterialApp(
|
||||
navigatorKey: navigatorKey,
|
||||
themeMode: themeMode,
|
||||
onGenerateTitle: onGenerateTitle,
|
||||
onGenerateInitialRoutes: onGenerateInitialRoutes,
|
||||
onUnknownRoute: onUnknownRoute,
|
||||
builder: builder,
|
||||
navigatorObservers: navigatorObservers,
|
||||
color: color,
|
||||
supportedLocales: supportedLocales,
|
||||
debugShowMaterialGrid: debugShowMaterialGrid,
|
||||
showPerformanceOverlay: showPerformanceOverlay,
|
||||
checkerboardRasterCacheImages: checkerboardRasterCacheImages,
|
||||
checkerboardOffscreenLayers: checkerboardOffscreenLayers,
|
||||
showSemanticsDebugger: showSemanticsDebugger,
|
||||
debugShowCheckedModeBanner: debugShowCheckedModeBanner,
|
||||
shortcuts: shortcuts,
|
||||
actions: actions,
|
||||
title: title ?? "",
|
||||
darkTheme: darkTheme,
|
||||
initialRoute: initialRoute,
|
||||
onGenerateRoute: this.onGenerateRoute,
|
||||
locale: locale,
|
||||
theme: theme,
|
||||
localizationsDelegates: [
|
||||
AppLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate
|
||||
],
|
||||
localeResolutionCallback:
|
||||
(Locale locale, Iterable<Locale> supportedLocales) {
|
||||
return locale;
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
19
LabelStoreMax/lib/bootstrap/app_helper.dart
Normal file
19
LabelStoreMax/lib/bootstrap/app_helper.dart
Normal file
@ -0,0 +1,19 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class AppHelper {
|
||||
AppHelper._privateConstructor();
|
||||
|
||||
static final AppHelper instance = AppHelper._privateConstructor();
|
||||
|
||||
WooSignalApp appConfig;
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -10,13 +10,13 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:label_storemax/helpers/app_helper.dart';
|
||||
import 'package:label_storemax/helpers/shared_pref/sp_user_id.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/models/billing_details.dart';
|
||||
import 'package:label_storemax/models/cart.dart';
|
||||
import 'package:label_storemax/models/cart_line_item.dart';
|
||||
import 'package:label_storemax/models/checkout_session.dart';
|
||||
import 'package:flutter_app/app/models/billing_details.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
import 'package:flutter_app/app/models/cart_line_item.dart';
|
||||
import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -1,4 +1,4 @@
|
||||
// Label StoreMAX
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
@ -9,28 +9,28 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_app/app/models/billing_details.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
import 'package:flutter_app/app/models/cart_line_item.dart';
|
||||
import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
import 'package:flutter_app/app/models/default_shipping.dart';
|
||||
import 'package:flutter_app/app/models/payment_type.dart';
|
||||
import 'package:flutter_app/app/models/user.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/shared_key.dart';
|
||||
import 'package:flutter_app/config/app_payment_gateways.dart';
|
||||
import 'package:flutter_app/resources/widgets/no_results_for_products_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:label_storemax/app_payment_methods.dart';
|
||||
import 'package:label_storemax/helpers/app_helper.dart';
|
||||
import 'package:label_storemax/helpers/app_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:label_storemax/labelconfig.dart';
|
||||
import 'package:edge_alert/edge_alert.dart';
|
||||
import 'package:label_storemax/models/billing_details.dart';
|
||||
import 'package:label_storemax/models/cart.dart';
|
||||
import 'package:label_storemax/models/cart_line_item.dart';
|
||||
import 'package:label_storemax/models/checkout_session.dart';
|
||||
import 'package:label_storemax/models/default_shipping.dart';
|
||||
import 'package:label_storemax/models/payment_type.dart';
|
||||
import 'package:html/parser.dart';
|
||||
import 'package:flutter_web_browser/flutter_web_browser.dart';
|
||||
import 'package:flutter_money_formatter/flutter_money_formatter.dart';
|
||||
import 'package:label_storemax/widgets/woosignal_ui.dart';
|
||||
import 'package:math_expressions/math_expressions.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
import 'package:platform_alert_dialog/platform_alert_dialog.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:status_alert/status_alert.dart';
|
||||
@ -38,18 +38,35 @@ import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/woosignal.dart';
|
||||
|
||||
Future<User> getUser() async =>
|
||||
(await NyStorage.read<User>(SharedKey.authUser, model: User()));
|
||||
|
||||
appWooSignal(Function(WooSignal) api) async {
|
||||
WooSignal wooSignal = await WooSignal.getInstance(
|
||||
config: {"appKey": app_key, "debugMode": app_debug});
|
||||
WooSignal wooSignal = await WooSignal.getInstance(config: {
|
||||
"appKey": getEnv('APP_KEY'),
|
||||
"debugMode": getEnv('APP_DEBUG', defaultValue: true)
|
||||
});
|
||||
return await api(wooSignal);
|
||||
}
|
||||
|
||||
List<PaymentType> getPaymentTypes() =>
|
||||
arrPaymentMethods.where((v) => v != null).toList();
|
||||
paymentTypeList.where((v) => v != null).toList();
|
||||
|
||||
PaymentType addPayment(PaymentType paymentType) {
|
||||
return app_payment_methods.contains(paymentType.name) ? paymentType : null;
|
||||
}
|
||||
PaymentType addPayment(
|
||||
{@required int id,
|
||||
@required String name,
|
||||
@required String desc,
|
||||
@required String assetImage,
|
||||
@required Function pay}) =>
|
||||
app_payment_gateways.contains(name)
|
||||
? PaymentType(
|
||||
id: id,
|
||||
name: name,
|
||||
desc: desc,
|
||||
assetImage: assetImage,
|
||||
pay: pay,
|
||||
)
|
||||
: null;
|
||||
|
||||
showStatusAlert(context,
|
||||
{@required String title, String subtitle, IconData icon, int duration}) {
|
||||
@ -63,10 +80,10 @@ showStatusAlert(context,
|
||||
}
|
||||
|
||||
class EdgeAlertStyle {
|
||||
static final int SUCCESS = 1;
|
||||
static final int WARNING = 2;
|
||||
static final int INFO = 3;
|
||||
static final int DANGER = 4;
|
||||
static const int SUCCESS = 1;
|
||||
static const int WARNING = 2;
|
||||
static const int INFO = 3;
|
||||
static const int DANGER = 4;
|
||||
}
|
||||
|
||||
void showEdgeAlertWith(context,
|
||||
@ -164,13 +181,7 @@ openBrowserTab({@required String url}) async {
|
||||
customTabsOptions: CustomTabsOptions(toolbarColor: Colors.white70));
|
||||
}
|
||||
|
||||
EdgeInsets safeAreaDefault() {
|
||||
return EdgeInsets.only(left: 16, right: 16, bottom: 8);
|
||||
}
|
||||
|
||||
String trans(BuildContext context, String key) {
|
||||
return AppLocalizations.of(context).trans(key);
|
||||
}
|
||||
EdgeInsets safeAreaDefault() => EdgeInsets.only(left: 16, right: 16, bottom: 8);
|
||||
|
||||
bool isNumeric(String str) {
|
||||
if (str == null) {
|
||||
@ -465,11 +476,10 @@ String formatForDateTime(FormatType formatType) {
|
||||
}
|
||||
}
|
||||
|
||||
String capitalize(String s) => s[0].toUpperCase() + s.substring(1);
|
||||
|
||||
double parseWcPrice(String price) => (double.tryParse(price) ?? 0);
|
||||
|
||||
void appLogOutput(dynamic message) => (app_debug == true ? log(message) : null);
|
||||
void appLogOutput(dynamic message) =>
|
||||
(getEnv('APP_DEBUG', defaultValue: true) ? NyLogger.debug(message) : null);
|
||||
|
||||
Widget refreshableScroll(context,
|
||||
{@required refreshController,
|
||||
@ -522,23 +532,10 @@ Widget refreshableScroll(context,
|
||||
mainAxisSpacing: 4.0,
|
||||
crossAxisSpacing: 4.0,
|
||||
)
|
||||
: NoProductResults()),
|
||||
: NoResultsForProductsWidget()),
|
||||
);
|
||||
}
|
||||
|
||||
double calAspectRatio(BuildContext context) {
|
||||
if (MediaQuery.of(context).size.height > 800) {
|
||||
return MediaQuery.of(context).size.width /
|
||||
(MediaQuery.of(context).size.height / 1.65);
|
||||
}
|
||||
if (MediaQuery.of(context).size.height > 700) {
|
||||
return MediaQuery.of(context).size.width /
|
||||
(MediaQuery.of(context).size.height / 1.35);
|
||||
}
|
||||
return MediaQuery.of(context).size.width /
|
||||
(MediaQuery.of(context).size.height / 1.3);
|
||||
}
|
||||
|
||||
class UserAuth {
|
||||
UserAuth._privateConstructor();
|
||||
static final UserAuth instance = UserAuth._privateConstructor();
|
||||
@ -548,7 +545,7 @@ class UserAuth {
|
||||
|
||||
Future<List<DefaultShipping>> getDefaultShipping(BuildContext context) async {
|
||||
String data = await DefaultAssetBundle.of(context)
|
||||
.loadString("assets/default_shipping.json");
|
||||
.loadString("public/assets/json/default_shipping.json");
|
||||
dynamic dataJson = json.decode(data);
|
||||
List<DefaultShipping> shipping = [];
|
||||
|
||||
16
LabelStoreMax/lib/bootstrap/shared_pref/shared_key.dart
Normal file
16
LabelStoreMax/lib/bootstrap/shared_pref/shared_key.dart
Normal file
@ -0,0 +1,16 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
class SharedKey {
|
||||
static const String authUser = "DEFAULT_SP_USER";
|
||||
static const String cart = "CART_SESSION";
|
||||
static const String customerBillingDetails = "CS_BILLING_DETAILS";
|
||||
static const String customerShippingDetails = "CS_SHIPPING_DETAILS";
|
||||
}
|
||||
27
LabelStoreMax/lib/bootstrap/shared_pref/sp_auth.dart
Normal file
27
LabelStoreMax/lib/bootstrap/shared_pref/sp_auth.dart
Normal file
@ -0,0 +1,27 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/shared_key.dart';
|
||||
import 'package:nylo_framework/helpers/helper.dart';
|
||||
|
||||
Future<bool> authCheck() async => ((await getUser()) != null);
|
||||
|
||||
Future<String> readAuthToken() async => (await getUser()).token;
|
||||
|
||||
Future<String> readUserId() async => (await getUser()).userId;
|
||||
|
||||
authLogout(BuildContext context) async {
|
||||
await NyStorage.delete(SharedKey.authUser);
|
||||
Cart.getInstance.clear();
|
||||
navigatorPush(context, routeName: "/home", forgetAll: true);
|
||||
}
|
||||
23
LabelStoreMax/lib/config/app_locale.dart
Normal file
23
LabelStoreMax/lib/config/app_locale.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| APP LOCALE
|
||||
|
|
||||
| Configure the language by setting the locale.
|
||||
|
|
||||
| e.g. Change app_locale = Locale('es'); for Spanish.
|
||||
| You can only use one of the supported locales below in app_locales_supported.
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const Locale app_locale = Locale('en');
|
||||
|
||||
const List<Locale> app_locales_supported = [
|
||||
Locale('en'),
|
||||
Locale('es'),
|
||||
Locale('fr'),
|
||||
Locale('hi'),
|
||||
Locale('it'),
|
||||
Locale('pt'),
|
||||
];
|
||||
54
LabelStoreMax/lib/config/app_payment_gateways.dart
Normal file
54
LabelStoreMax/lib/config/app_payment_gateways.dart
Normal file
@ -0,0 +1,54 @@
|
||||
import 'package:flutter_app/app/models/payment_type.dart';
|
||||
import 'package:flutter_app/app/providers/cash_on_delivery.dart';
|
||||
import 'package:flutter_app/app/providers/razor_pay.dart';
|
||||
import 'package:flutter_app/app/providers/stripe_pay.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PAYMENT GATEWAYS
|
||||
|
|
||||
| Configure which payment gateways you want to use.
|
||||
| Docs here: https://woosignal.com/docs/app/ios/label-storemax
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const app_payment_gateways = ["Stripe"];
|
||||
// Available: "Stripe", "CashOnDelivery", "RazorPay"
|
||||
// e.g. app_payment_gateways = ["Stripe", "CashOnDelivery"]; will only use Stripe and Cash on Delivery.
|
||||
|
||||
List<PaymentType> paymentTypeList = [
|
||||
addPayment(
|
||||
id: 1,
|
||||
name: "Stripe",
|
||||
desc: "Debit or Credit Card",
|
||||
assetImage: "dark_powered_by_stripe.png",
|
||||
pay: stripePay,
|
||||
),
|
||||
|
||||
addPayment(
|
||||
id: 2,
|
||||
name: "CashOnDelivery",
|
||||
desc: "Cash on delivery",
|
||||
assetImage: "cash_on_delivery.jpeg",
|
||||
pay: cashOnDeliveryPay,
|
||||
),
|
||||
|
||||
addPayment(
|
||||
id: 3,
|
||||
name: "RazorPay",
|
||||
desc: "Debit or Credit Card",
|
||||
assetImage: "razorpay.png",
|
||||
pay: razorPay,
|
||||
),
|
||||
|
||||
// e.g. add more here
|
||||
|
||||
// addPayment(
|
||||
// id: 4,
|
||||
// name: "MyNewPaymentMethod",
|
||||
// desc: "Debit or Credit Card",
|
||||
// assetImage: "add icon image to public/assets/images/myimage.png",
|
||||
// pay: "myCustomPaymentFunction",
|
||||
// ),
|
||||
];
|
||||
62
LabelStoreMax/lib/config/app_theme.dart
Normal file
62
LabelStoreMax/lib/config/app_theme.dart
Normal file
@ -0,0 +1,62 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| APP THEME
|
||||
|
|
||||
| Change the font and colors for your themes.
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Theme main font
|
||||
final TextStyle appThemeFont = GoogleFonts.overpass();
|
||||
|
||||
// Theme colors
|
||||
class AppColors {
|
||||
// MAIN
|
||||
Color _mainLightColor = Color(0xFF232c33);
|
||||
Color _mainDarkColor = Color(0xFFFAFAFA);
|
||||
|
||||
// SECONDARY
|
||||
Color _secondLightColor = Color(0xFF232c33);
|
||||
Color _secondDarkColor = Color(0xFFF1F1F1);
|
||||
|
||||
// ACCENT
|
||||
Color _accentLightColor = Color(0xFF465f81);
|
||||
Color _accentDarkColor = Color(0xFF4a4a4a);
|
||||
|
||||
// SCAFFOLD
|
||||
Color _scaffoldDarkColor = Color(0xFF2C2C2C);
|
||||
Color _scaffoldLightColor = Color(0xFFFAFAFA);
|
||||
}
|
||||
|
||||
class AppTheme extends AppColors {
|
||||
Color mainColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _mainLightColor.withOpacity(opacity)
|
||||
: _mainDarkColor.withOpacity(opacity));
|
||||
}
|
||||
|
||||
Color secondColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _secondLightColor.withOpacity(opacity)
|
||||
: _secondDarkColor.withOpacity(opacity));
|
||||
}
|
||||
|
||||
Color accentColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _accentLightColor.withOpacity(opacity)
|
||||
: _accentDarkColor.withOpacity(opacity));
|
||||
}
|
||||
|
||||
Color scaffoldColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _scaffoldLightColor.withOpacity(opacity)
|
||||
: _scaffoldDarkColor.withOpacity(opacity));
|
||||
}
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:shared_preferences_web/shared_preferences_web.dart';
|
||||
import 'package:url_launcher_web/url_launcher_web.dart';
|
||||
|
||||
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
|
||||
// ignore: public_member_api_docs
|
||||
void registerPlugins(Registrar registrar) {
|
||||
SharedPreferencesPlugin.registerWith(registrar);
|
||||
UrlLauncherPlugin.registerWith(registrar);
|
||||
registrar.registerMessageHandler();
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class AppHelper {
|
||||
AppHelper._privateConstructor();
|
||||
|
||||
static final AppHelper instance = AppHelper._privateConstructor();
|
||||
|
||||
WooSignalApp appConfig;
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../labelconfig.dart';
|
||||
|
||||
class AppLocalizations {
|
||||
final Locale locale;
|
||||
|
||||
AppLocalizations(this.locale);
|
||||
|
||||
static AppLocalizations of(BuildContext context) {
|
||||
return Localizations.of<AppLocalizations>(context, AppLocalizations);
|
||||
}
|
||||
|
||||
static const LocalizationsDelegate<AppLocalizations> delegate =
|
||||
_AppLocalizationsDelegate();
|
||||
|
||||
Map<String, String> _localizedStrings;
|
||||
|
||||
Future load() async {
|
||||
String jsonString =
|
||||
await rootBundle.loadString('lang/${locale.languageCode}.json');
|
||||
Map<String, dynamic> jsonMap = json.decode(jsonString);
|
||||
|
||||
_localizedStrings = jsonMap.map((k, v) {
|
||||
return MapEntry(k, v.toString());
|
||||
});
|
||||
}
|
||||
|
||||
String trans(String key) => _localizedStrings[key];
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
extends LocalizationsDelegate<AppLocalizations> {
|
||||
const _AppLocalizationsDelegate();
|
||||
|
||||
@override
|
||||
bool isSupported(Locale locale) => app_locales_supported
|
||||
.map((e) => e.languageCode)
|
||||
.toList()
|
||||
.contains(locale.languageCode);
|
||||
|
||||
@override
|
||||
bool shouldReload(_AppLocalizationsDelegate old) => false;
|
||||
|
||||
Future<AppLocalizations> load(Locale locale) async {
|
||||
AppLocalizations localizations = new AppLocalizations(locale);
|
||||
await localizations.load();
|
||||
return localizations;
|
||||
}
|
||||
}
|
||||
@ -1,168 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
import 'package:label_storemax/widgets/woosignal_ui.dart';
|
||||
|
||||
TextTheme textThemeAccent() {
|
||||
return TextTheme(
|
||||
headline4: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 26),
|
||||
headline3: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w600),
|
||||
headline2: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w600),
|
||||
headline1: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w600),
|
||||
headline5: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline6: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
),
|
||||
subtitle1: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w800),
|
||||
bodyText1: new TextStyle(
|
||||
color: HexColor("#606060"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700),
|
||||
bodyText2: new TextStyle(
|
||||
color: HexColor("#a8a8a8"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 18),
|
||||
caption: new TextStyle(
|
||||
color: HexColor("#2a5080"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 14),
|
||||
button: new TextStyle(
|
||||
color: Colors.white,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700),
|
||||
);
|
||||
}
|
||||
|
||||
TextTheme textThemePrimary() {
|
||||
return TextTheme(
|
||||
headline4: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 26),
|
||||
headline3: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w600),
|
||||
headline2: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w600),
|
||||
headline1: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w600),
|
||||
headline5: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline6: new TextStyle(
|
||||
color: Colors.black87,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w600),
|
||||
subtitle1: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w800),
|
||||
bodyText1: new TextStyle(
|
||||
color: HexColor("#606060"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700),
|
||||
bodyText2: new TextStyle(
|
||||
color: HexColor("#a8a8a8"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 18),
|
||||
caption: new TextStyle(
|
||||
color: HexColor("#2a5080"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 14),
|
||||
button: new TextStyle(
|
||||
color: Colors.white,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700),
|
||||
);
|
||||
}
|
||||
|
||||
TextTheme textThemeMain() {
|
||||
return TextTheme(
|
||||
headline4: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
),
|
||||
headline3: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline5: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline6: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
subtitle1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
bodyText2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
caption: new TextStyle(
|
||||
color: Colors.redAccent, fontSize: 16, fontFamily: appFontFamily),
|
||||
button: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
);
|
||||
}
|
||||
|
||||
TextTheme textThemeAppBar() {
|
||||
return TextTheme(
|
||||
headline4: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline3: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline5: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
headline6: new TextStyle(
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w900),
|
||||
subtitle1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
bodyText2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
caption: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
button: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
);
|
||||
}
|
||||
|
||||
ColorScheme colorSchemeButton() {
|
||||
return ColorScheme.light(
|
||||
primary: const Color(0xff6200ee),
|
||||
primaryVariant: const Color(0xff3700b3),
|
||||
secondary: const Color(0xff03dac6),
|
||||
secondaryVariant: const Color(0xff018786),
|
||||
surface: Colors.white,
|
||||
background: Colors.white,
|
||||
error: const Color(0xffb00020),
|
||||
onPrimary: Colors.white,
|
||||
onSecondary: Colors.black,
|
||||
onSurface: Colors.black,
|
||||
onBackground: Colors.black,
|
||||
onError: Colors.white,
|
||||
brightness: Brightness.light,
|
||||
);
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class SharedPref {
|
||||
read(String key) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
return prefs.getString(key);
|
||||
}
|
||||
|
||||
save(String key, value) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
prefs.setString(key, value);
|
||||
}
|
||||
|
||||
remove(String key) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
prefs.remove(key);
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:label_storemax/helpers/shared_pref.dart';
|
||||
import 'package:label_storemax/helpers/shared_pref/sp_user_id.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/models/cart.dart';
|
||||
|
||||
const keyAuthCheck = "DEFAULT_SP_AUTHCHECK";
|
||||
|
||||
Future<bool> authCheck() async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
String val = await sharedPref.read(keyAuthCheck);
|
||||
return val != null ? true : false;
|
||||
}
|
||||
|
||||
authUser(String v) async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
await sharedPref.save(keyAuthCheck, v);
|
||||
}
|
||||
|
||||
Future<String> readAuthToken() async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
dynamic val = await sharedPref.read(keyAuthCheck);
|
||||
return val.toString();
|
||||
}
|
||||
|
||||
authLogout(BuildContext context) async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
await sharedPref.save(keyAuthCheck, null);
|
||||
destroyUserId(context);
|
||||
Cart.getInstance.clear();
|
||||
navigatorPush(context, routeName: "/home", forgetAll: true);
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:label_storemax/helpers/shared_pref.dart';
|
||||
|
||||
const keyUserId = "DEFAULT_SP_USERID";
|
||||
|
||||
storeUserId(String v) async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
await sharedPref.save(keyUserId, v);
|
||||
}
|
||||
|
||||
Future<String> readUserId() async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
return await sharedPref.read(keyUserId);
|
||||
}
|
||||
|
||||
destroyUserId(BuildContext context) async {
|
||||
SharedPref sharedPref = SharedPref();
|
||||
await sharedPref.save(keyUserId, null);
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
//
|
||||
// LabelCore
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'dart:ui';
|
||||
|
||||
/*
|
||||
Developer Notes
|
||||
|
||||
SUPPORT EMAIL - support@woosignal.com
|
||||
VERSION - 3.0.0
|
||||
https://woosignal.com
|
||||
*/
|
||||
|
||||
/*<! ------ CONFIG ------!>*/
|
||||
|
||||
const app_name = "MyApp";
|
||||
|
||||
const app_key = "Your app key from WooSignal";
|
||||
|
||||
// Your App key from WooSignal
|
||||
// link: https://woosignal.com/dashboard/apps
|
||||
|
||||
/*<! ------ APP SETTINGS ------!>*/
|
||||
|
||||
const Locale app_locale = Locale('en');
|
||||
|
||||
const List<Locale> app_locales_supported = [
|
||||
Locale('en'),
|
||||
Locale('es'),
|
||||
Locale('fr'),
|
||||
Locale('hi'),
|
||||
Locale('it'),
|
||||
Locale('pt'),
|
||||
];
|
||||
// If you want to localize the app, add the locale above
|
||||
// then create a new lang json file using keys from en.json
|
||||
// e.g. lang/es.json
|
||||
|
||||
const app_product_placeholder_image =
|
||||
"https://woosignal.com/images/woocommerce-placeholder.png";
|
||||
|
||||
/*<! ------ PAYMENT GATEWAYS ------!>*/
|
||||
|
||||
// Available: "Stripe", "CashOnDelivery", "RazorPay"
|
||||
// Add the method to the array below e.g. ["Stripe", "CashOnDelivery"]
|
||||
|
||||
const app_payment_methods = ["Stripe"];
|
||||
|
||||
/*<! ------ STRIPE (OPTIONAL) ------!>*/
|
||||
|
||||
// Your StripeAccount key from WooSignal
|
||||
// link: https://woosignal.com/dashboard
|
||||
|
||||
const app_stripe_account = "Your Stripe Key from WooSignal";
|
||||
|
||||
const app_stripe_live_mode = false; // set to true for live Stripe payments
|
||||
// For Live Payments follow the below steps
|
||||
// #1 SET the above to true for live payments
|
||||
// #2 Next visit https://woosignal.com/dashboard
|
||||
// #3 Then change "Environment for Stripe" to Live mode
|
||||
|
||||
/*<! ------ Razor Pay (OPTIONAL) ------!>*/
|
||||
// https://razorpay.com/
|
||||
|
||||
const app_razor_id = "Your Razor ID from RazorPay";
|
||||
|
||||
/*<! ------ DEBUGGER ENABLED ------!>*/
|
||||
|
||||
const app_debug = true;
|
||||
@ -1,59 +1,30 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
import 'package:label_storemax/helpers/app_helper.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/pages/account_billing_details.dart';
|
||||
import 'package:label_storemax/pages/account_detail.dart';
|
||||
import 'package:label_storemax/pages/account_landing.dart';
|
||||
import 'package:label_storemax/pages/account_order_detail.dart';
|
||||
import 'package:label_storemax/pages/account_profile_update.dart';
|
||||
import 'package:label_storemax/pages/account_register.dart';
|
||||
import 'package:label_storemax/pages/account_shipping_details.dart';
|
||||
import 'package:label_storemax/pages/customer_countries.dart';
|
||||
import 'package:label_storemax/pages/error_page.dart';
|
||||
import 'package:label_storemax/pages/no_connection_page.dart';
|
||||
import 'package:label_storemax/pages/product_image_viewer_page.dart';
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
import 'package:woosignal/models/response/product_category.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_app/bootstrap/app.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/config/app_locale.dart';
|
||||
import 'package:flutter_app/resources/themes/dark_theme.dart';
|
||||
import 'package:flutter_app/resources/themes/default_theme.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:flutter_app/routes/router.dart';
|
||||
import 'package:nylo_framework/nylo.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:nylo_framework/theme/helper/theme_helper.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
import 'package:wp_json_api/wp_json_api.dart';
|
||||
import 'labelconfig.dart';
|
||||
import 'package:label_storemax/pages/checkout_details.dart';
|
||||
import 'package:label_storemax/pages/home.dart';
|
||||
import 'package:label_storemax/pages/about.dart';
|
||||
import 'package:label_storemax/pages/checkout_confirmation.dart';
|
||||
import 'package:label_storemax/pages/cart.dart';
|
||||
import 'package:label_storemax/pages/checkout_status.dart';
|
||||
import 'package:label_storemax/pages/checkout_payment_type.dart';
|
||||
import 'package:label_storemax/pages/checkout_shipping_type.dart';
|
||||
import 'package:label_storemax/pages/product_detail.dart';
|
||||
import 'package:label_storemax/pages/browse_search.dart';
|
||||
import 'package:label_storemax/pages/home_menu.dart';
|
||||
import 'package:label_storemax/pages/home_search.dart';
|
||||
import 'package:label_storemax/pages/browse_category.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:page_transition/page_transition.dart';
|
||||
import 'package:label_storemax/helpers/app_themes.dart';
|
||||
import 'package:label_storemax/helpers/app_localizations.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
AppTheme appTheme = AppTheme();
|
||||
|
||||
Nylo nylo =
|
||||
await initNylo(theme: defaultTheme(appTheme), router: buildRouter());
|
||||
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
]);
|
||||
|
||||
String initialRoute = '/no-connection';
|
||||
WooSignalApp wooSignalApp = await appWooSignal((api) => api.getApp());
|
||||
|
||||
@ -64,205 +35,22 @@ void main() async {
|
||||
if (wooSignalApp.wpLoginEnabled == 1) {
|
||||
WPJsonAPI.instance.initWith(
|
||||
baseUrl: wooSignalApp.wpLoginBaseUrl,
|
||||
shouldDebug: wooSignalApp.appDebug == 1 ? true : false,
|
||||
shouldDebug: (wooSignalApp.appDebug == 1),
|
||||
wpJsonPath: wooSignalApp.wpLoginWpApiPath,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
runApp(
|
||||
new MaterialApp(
|
||||
title: wooSignalApp?.appName ?? "Label StoreMax",
|
||||
color: Colors.white,
|
||||
debugShowCheckedModeBanner: false,
|
||||
initialRoute: initialRoute,
|
||||
routes: <String, WidgetBuilder>{
|
||||
'/home': (BuildContext context) => new HomePage(),
|
||||
'/cart': (BuildContext context) => new CartPage(),
|
||||
'/error': (BuildContext context) => new ErrorPage(),
|
||||
'/checkout': (BuildContext context) => new CheckoutConfirmationPage(),
|
||||
'/account-register': (BuildContext context) =>
|
||||
new AccountRegistrationPage(),
|
||||
'/account-detail': (BuildContext context) => new AccountDetailPage(),
|
||||
'/account-update': (BuildContext context) =>
|
||||
new AccountProfileUpdatePage(),
|
||||
'/account-billing-details': (BuildContext context) =>
|
||||
new AccountBillingDetailsPage(),
|
||||
'/account-shipping-details': (BuildContext context) =>
|
||||
new AccountShippingDetailsPage(),
|
||||
'/no-connection': (BuildContext context) => new NoConnectionPage(),
|
||||
},
|
||||
onGenerateRoute: (settings) {
|
||||
switch (settings.name) {
|
||||
case '/account-landing':
|
||||
return PageTransition(
|
||||
child: AccountLandingPage(),
|
||||
type: PageTransitionType.bottomToTop,
|
||||
);
|
||||
|
||||
case '/browse-category':
|
||||
if (settings.arguments != null) {
|
||||
final ProductCategory category =
|
||||
settings.arguments as ProductCategory;
|
||||
return PageTransition(
|
||||
child: BrowseCategoryPage(productCategory: category),
|
||||
type: PageTransitionType.fade,
|
||||
);
|
||||
}
|
||||
return PageTransition(
|
||||
child: ErrorPage(),
|
||||
type: PageTransitionType.fade,
|
||||
);
|
||||
|
||||
case '/product-search':
|
||||
if (settings.arguments != null) {
|
||||
final String search = settings.arguments as String;
|
||||
return PageTransition(
|
||||
child: BrowseSearchPage(search: search),
|
||||
type: PageTransitionType.fade,
|
||||
);
|
||||
}
|
||||
return PageTransition(
|
||||
child: ErrorPage(),
|
||||
type: PageTransitionType.fade,
|
||||
);
|
||||
|
||||
case '/product-detail':
|
||||
if (settings.arguments != null) {
|
||||
final Product product = settings.arguments as Product;
|
||||
return PageTransition(
|
||||
child: ProductDetailPage(product: product),
|
||||
type: PageTransitionType.rightToLeftWithFade,
|
||||
);
|
||||
}
|
||||
return PageTransition(
|
||||
child: ErrorPage(),
|
||||
type: PageTransitionType.fade,
|
||||
);
|
||||
|
||||
case '/product-images':
|
||||
if (settings.arguments != null) {
|
||||
final Map<String, dynamic> args = settings.arguments;
|
||||
return PageTransition(
|
||||
child: ProductImageViewerPage(
|
||||
initialIndex: args["index"],
|
||||
arrImageSrc: args["images"],
|
||||
),
|
||||
type: PageTransitionType.fade);
|
||||
}
|
||||
return PageTransition(
|
||||
child: ErrorPage(), type: PageTransitionType.rightToLeft);
|
||||
|
||||
case '/account-order-detail':
|
||||
if (settings.arguments != null) {
|
||||
final int orderId = settings.arguments as int;
|
||||
return PageTransition(
|
||||
child: AccountOrderDetailPage(orderId: orderId),
|
||||
type: PageTransitionType.rightToLeftWithFade,
|
||||
);
|
||||
}
|
||||
return PageTransition(
|
||||
child: ErrorPage(),
|
||||
type: PageTransitionType.fade,
|
||||
);
|
||||
|
||||
case '/checkout-status':
|
||||
if (settings.arguments != null) {
|
||||
final Order order = settings.arguments as Order;
|
||||
return PageTransition(
|
||||
child: CheckoutStatusPage(order: order),
|
||||
type: PageTransitionType.rightToLeftWithFade,
|
||||
);
|
||||
}
|
||||
return PageTransition(
|
||||
child: ErrorPage(),
|
||||
type: PageTransitionType.fade,
|
||||
);
|
||||
|
||||
case '/home-menu':
|
||||
return PageTransition(
|
||||
child: HomeMenuPage(),
|
||||
type: PageTransitionType.leftToRightWithFade,
|
||||
);
|
||||
|
||||
case '/checkout-details':
|
||||
return PageTransition(
|
||||
child: CheckoutDetailsPage(),
|
||||
type: PageTransitionType.bottomToTop,
|
||||
);
|
||||
|
||||
case '/about':
|
||||
return PageTransition(
|
||||
child: AboutPage(),
|
||||
type: PageTransitionType.leftToRightWithFade,
|
||||
);
|
||||
|
||||
case '/checkout-payment-type':
|
||||
return PageTransition(
|
||||
child: CheckoutPaymentTypePage(),
|
||||
type: PageTransitionType.bottomToTop,
|
||||
);
|
||||
|
||||
case '/checkout-shipping-type':
|
||||
return PageTransition(
|
||||
child: CheckoutShippingTypePage(),
|
||||
type: PageTransitionType.bottomToTop,
|
||||
);
|
||||
|
||||
case '/home-search':
|
||||
return PageTransition(
|
||||
child: HomeSearchPage(),
|
||||
type: PageTransitionType.bottomToTop,
|
||||
);
|
||||
|
||||
case '/customer-countries':
|
||||
return PageTransition(
|
||||
child: CustomerCountriesPage(),
|
||||
type: PageTransitionType.bottomToTop,
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
},
|
||||
supportedLocales: app_locales_supported,
|
||||
localizationsDelegates: [
|
||||
AppLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate
|
||||
],
|
||||
AppBuild(
|
||||
navigatorKey: nylo.router.navigatorKey,
|
||||
onGenerateRoute: nylo.router.generator(),
|
||||
themeData: CurrentTheme.instance.theme,
|
||||
darkTheme: darkTheme(appTheme),
|
||||
locale: app_locale,
|
||||
localeResolutionCallback:
|
||||
(Locale locale, Iterable<Locale> supportedLocales) {
|
||||
return locale;
|
||||
},
|
||||
theme: ThemeData(
|
||||
primaryColor: HexColor("#2f4ffe"),
|
||||
backgroundColor: Colors.white,
|
||||
buttonTheme: ButtonThemeData(
|
||||
hoverColor: Colors.transparent,
|
||||
buttonColor: HexColor("#529cda"),
|
||||
colorScheme: colorSchemeButton(),
|
||||
minWidth: double.infinity,
|
||||
height: 70,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: new BorderRadius.circular(5.0),
|
||||
),
|
||||
),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Colors.white,
|
||||
textTheme: textThemeAppBar(),
|
||||
elevation: 0.0,
|
||||
brightness: Brightness.light,
|
||||
iconTheme: IconThemeData(color: Colors.black),
|
||||
actionsIconTheme: IconThemeData(
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
accentColor: Colors.black,
|
||||
accentTextTheme: textThemeAccent(),
|
||||
textTheme: textThemeMain(),
|
||||
primaryTextTheme: textThemePrimary(),
|
||||
),
|
||||
initialRoute: initialRoute,
|
||||
supportedLocales: app_locales_supported,
|
||||
debugShowCheckedModeBanner: false,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,114 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:label_storemax/helpers/app_helper.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/widgets/menu_item.dart';
|
||||
import 'package:label_storemax/widgets/woosignal_ui.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class AboutPage extends StatefulWidget {
|
||||
AboutPage();
|
||||
|
||||
@override
|
||||
_AboutPageState createState() => _AboutPageState();
|
||||
}
|
||||
|
||||
class _AboutPageState extends State<AboutPage> {
|
||||
_AboutPageState();
|
||||
|
||||
WooSignalApp _wooSignalApp;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_wooSignalApp = AppHelper.instance.appConfig;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
title: Text(
|
||||
trans(context, "About"),
|
||||
style: Theme.of(context).primaryTextTheme.headline6,
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
minimum: safeAreaDefault(),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Center(child: StoreLogo()),
|
||||
flex: 2,
|
||||
),
|
||||
Flexible(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
MenuItem(
|
||||
title: trans(context, "Privacy policy"),
|
||||
leading: Icon(Icons.people),
|
||||
action: _actionPrivacy,
|
||||
),
|
||||
MenuItem(
|
||||
title: trans(context, "Terms and conditions"),
|
||||
leading: Icon(Icons.description),
|
||||
action: _actionTerms,
|
||||
),
|
||||
FutureBuilder<PackageInfo>(
|
||||
future: PackageInfo.fromPlatform(),
|
||||
builder: (BuildContext context,
|
||||
AsyncSnapshot<PackageInfo> snapshot) {
|
||||
switch (snapshot.connectionState) {
|
||||
case ConnectionState.none:
|
||||
return Text("");
|
||||
case ConnectionState.active:
|
||||
case ConnectionState.waiting:
|
||||
return Text("");
|
||||
case ConnectionState.done:
|
||||
if (snapshot.hasError) return Text("");
|
||||
return Padding(
|
||||
child: Text(
|
||||
"${trans(context, "Version")}: ${snapshot.data.version}",
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyText1),
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
);
|
||||
}
|
||||
return null; // unreachable
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
flex: 2,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _actionTerms() => openBrowserTab(url: _wooSignalApp.appTermslink);
|
||||
|
||||
void _actionPrivacy() => openBrowserTab(url: _wooSignalApp.appPrivacylink);
|
||||
}
|
||||
@ -1,187 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/models/cart.dart';
|
||||
import 'package:label_storemax/models/checkout_session.dart';
|
||||
import 'package:woosignal/models/response/products.dart' as WS;
|
||||
import 'package:woosignal/models/response/order.dart' as WS;
|
||||
|
||||
import '../widgets/woosignal_ui.dart';
|
||||
|
||||
class CheckoutStatusPage extends StatefulWidget {
|
||||
final WS.Order order;
|
||||
CheckoutStatusPage({Key key, @required this.order}) : super(key: key);
|
||||
|
||||
@override
|
||||
_CheckoutStatusState createState() => _CheckoutStatusState(this.order);
|
||||
}
|
||||
|
||||
class _CheckoutStatusState extends State<CheckoutStatusPage> {
|
||||
_CheckoutStatusState(this._order);
|
||||
|
||||
WS.Order _order;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
Cart.getInstance.clear();
|
||||
CheckoutSession.getInstance.clear();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 0.0,
|
||||
title: StoreLogo(height: 60),
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
child: Text(
|
||||
trans(context, "Order Status"),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 15),
|
||||
),
|
||||
Text(
|
||||
trans(context, "Thank You!"),
|
||||
style: Theme.of(context).primaryTextTheme.headline6,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
Text(
|
||||
trans(context, "Your transaction details"),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
Text(
|
||||
trans(context, "Order Ref") +
|
||||
". #" +
|
||||
_order.id.toString(),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
],
|
||||
),
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: Colors.black12, width: 1.0),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 20),
|
||||
),
|
||||
Container(
|
||||
child: Image(
|
||||
image: new AssetImage("assets/images/camion.gif"),
|
||||
height: 170,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
width: double.infinity,
|
||||
),
|
||||
],
|
||||
),
|
||||
Align(
|
||||
child: Padding(
|
||||
child: Text(
|
||||
trans(context, "Items"),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
Expanded(
|
||||
child: new ListView.builder(
|
||||
itemCount: _order.lineItems.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
WS.LineItems lineItem = _order.lineItems[index];
|
||||
return Container(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
lineItem.name,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyText1,
|
||||
softWrap: false,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"x" + lineItem.quantity.toString(),
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyText2,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
formatStringCurrency(
|
||||
total: lineItem.total.toString(),
|
||||
),
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyText1,
|
||||
)
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
padding: EdgeInsets.all(16),
|
||||
margin: EdgeInsets.all(8),
|
||||
);
|
||||
}),
|
||||
),
|
||||
Align(
|
||||
child: MaterialButton(
|
||||
child: Text(trans(context, "Back to Home")),
|
||||
onPressed: () => Navigator.pushNamed(context, "/home"),
|
||||
),
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,62 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/widgets/buttons.dart';
|
||||
|
||||
class ErrorPage extends StatefulWidget {
|
||||
ErrorPage();
|
||||
|
||||
@override
|
||||
_ErrorPageState createState() => _ErrorPageState();
|
||||
}
|
||||
|
||||
class _ErrorPageState extends State<ErrorPage> {
|
||||
_ErrorPageState();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
minimum: safeAreaDefault(),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
size: 100,
|
||||
color: Colors.black54,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
trans(context, "Sorry, something went wrong"),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
LinkButton(
|
||||
title: trans(context, "Back"),
|
||||
action: () => Navigator.pop(context)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,105 +0,0 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:label_storemax/helpers/app_helper.dart';
|
||||
import 'package:label_storemax/helpers/shared_pref/sp_auth.dart';
|
||||
import 'package:label_storemax/widgets/menu_item.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
|
||||
import '../widgets/woosignal_ui.dart';
|
||||
|
||||
class HomeMenuPage extends StatefulWidget {
|
||||
HomeMenuPage();
|
||||
|
||||
@override
|
||||
_HomeMenuPageState createState() => _HomeMenuPageState();
|
||||
}
|
||||
|
||||
class _HomeMenuPageState extends State<HomeMenuPage> {
|
||||
_HomeMenuPageState();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0.0,
|
||||
title: Text(
|
||||
trans(context, "Menu"),
|
||||
style: Theme.of(context).primaryTextTheme.headline6,
|
||||
),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
minimum: safeAreaDefault(),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
StoreLogo(height: 100),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
(AppHelper.instance.appConfig.wpLoginEnabled == 1
|
||||
? MenuItem(
|
||||
title: trans(context, "Profile"),
|
||||
leading: Icon(Icons.account_circle),
|
||||
action: _actionProfile,
|
||||
)
|
||||
: Container()),
|
||||
MenuItem(
|
||||
title: trans(context, "Cart"),
|
||||
leading: Icon(Icons.shopping_cart),
|
||||
action: _actionCart,
|
||||
),
|
||||
MenuItem(
|
||||
title: trans(context, "About Us"),
|
||||
leading: Icon(Icons.account_balance),
|
||||
action: _actionAboutUs,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _actionCart() {
|
||||
Navigator.pushNamed(context, "/cart");
|
||||
}
|
||||
|
||||
void _actionAboutUs() {
|
||||
Navigator.pushNamed(context, "/about");
|
||||
}
|
||||
|
||||
void _actionProfile() async {
|
||||
if (AppHelper.instance.appConfig.wpLoginEnabled == 1 &&
|
||||
!(await authCheck())) {
|
||||
UserAuth.instance.redirect = "/account-detail";
|
||||
Navigator.pushNamed(context, "/account-landing");
|
||||
return;
|
||||
}
|
||||
Navigator.pushNamed(context, "/account-detail");
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user