From 2dd382c1d733c92c75e4e7e0e2118c4e4df00dcf Mon Sep 17 00:00:00 2001 From: Anthony Gordon Date: Wed, 7 Oct 2020 21:40:47 +0100 Subject: [PATCH] v2.2.0 changes --- LabelStoreMax/android/.gitignore | 11 +++++ LabelStoreMax/android/app/build.gradle | 25 +++++------ .../android/app/src/main/AndroidManifest.xml | 36 ++++++++++------ .../woosignal/label_storemax/MainActivity.kt | 9 +--- .../app/src/main/res/values/styles.xml | 10 +++++ LabelStoreMax/android/build.gradle | 10 ++--- LabelStoreMax/android/gradle.properties | 1 - .../gradle/wrapper/gradle-wrapper.properties | 4 +- LabelStoreMax/android/key.properties | 10 ----- LabelStoreMax/android/settings.gradle | 18 ++++---- LabelStoreMax/flutter_application_id.yaml | 12 ++++++ .../ios/Runner.xcodeproj/project.pbxproj | 9 ++-- LabelStoreMax/ios/Runner/Info.plist | 4 +- LabelStoreMax/lib/helpers/app_themes.dart | 13 +++--- LabelStoreMax/lib/helpers/tools.dart | 12 ------ LabelStoreMax/lib/labelconfig.dart | 2 +- LabelStoreMax/lib/main.dart | 20 +++++---- .../lib/pages/account_billing_details.dart | 3 +- LabelStoreMax/lib/pages/account_detail.dart | 3 +- .../lib/pages/account_order_detail.dart | 3 +- .../lib/pages/account_shipping_details.dart | 3 +- LabelStoreMax/lib/pages/cart.dart | 6 ++- .../lib/pages/checkout_confirmation.dart | 28 +++++++------ .../lib/pages/checkout_shipping_type.dart | 8 ++-- LabelStoreMax/lib/pages/home.dart | 1 + LabelStoreMax/lib/widgets/app_loader.dart | 4 +- LabelStoreMax/lib/widgets/buttons.dart | 6 +-- LabelStoreMax/lib/widgets/woosignal_ui.dart | 3 +- LabelStoreMax/pubspec.yaml | 41 +++++++++++-------- 29 files changed, 172 insertions(+), 143 deletions(-) create mode 100644 LabelStoreMax/android/.gitignore delete mode 100644 LabelStoreMax/android/key.properties create mode 100644 LabelStoreMax/flutter_application_id.yaml diff --git a/LabelStoreMax/android/.gitignore b/LabelStoreMax/android/.gitignore new file mode 100644 index 0000000..0a741cb --- /dev/null +++ b/LabelStoreMax/android/.gitignore @@ -0,0 +1,11 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties diff --git a/LabelStoreMax/android/app/build.gradle b/LabelStoreMax/android/app/build.gradle index fce456a..8cd5f3a 100644 --- a/LabelStoreMax/android/app/build.gradle +++ b/LabelStoreMax/android/app/build.gradle @@ -32,7 +32,7 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 28 + compileSdkVersion 29 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -43,13 +43,13 @@ android { } defaultConfig { - applicationId "com.woosignal.label_storemax" - minSdkVersion 28 - targetSdkVersion 28 + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.woosignal.android" + minSdkVersion 19 + targetSdkVersion 29 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled = true + multiDexEnabled true } signingConfigs { @@ -60,20 +60,23 @@ android { storePassword keystoreProperties['storePassword'] } } + buildTypes { 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.release + // signingConfig signingConfigs.release signingConfig signingConfigs.debug } } - } flutter { @@ -82,7 +85,5 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' -} + implementation 'com.android.support:multidex:1.0.3' +} \ No newline at end of file diff --git a/LabelStoreMax/android/app/src/main/AndroidManifest.xml b/LabelStoreMax/android/app/src/main/AndroidManifest.xml index a4095b0..b176c40 100644 --- a/LabelStoreMax/android/app/src/main/AndroidManifest.xml +++ b/LabelStoreMax/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,5 @@ - + package="com.woosignal.label_storemax"> + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + @@ -44,5 +51,10 @@ android:host="3ds.stripesdk.io" /> + + \ No newline at end of file diff --git a/LabelStoreMax/android/app/src/main/kotlin/com/woosignal/label_storemax/MainActivity.kt b/LabelStoreMax/android/app/src/main/kotlin/com/woosignal/label_storemax/MainActivity.kt index 72d2edb..2a20ec0 100644 --- a/LabelStoreMax/android/app/src/main/kotlin/com/woosignal/label_storemax/MainActivity.kt +++ b/LabelStoreMax/android/app/src/main/kotlin/com/woosignal/label_storemax/MainActivity.kt @@ -1,13 +1,6 @@ package com.woosignal.label_storemax -import android.os.Bundle - -import io.flutter.app.FlutterActivity -import io.flutter.plugins.GeneratedPluginRegistrant +import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - GeneratedPluginRegistrant.registerWith(this) - } } diff --git a/LabelStoreMax/android/app/src/main/res/values/styles.xml b/LabelStoreMax/android/app/src/main/res/values/styles.xml index 00fa441..1f83a33 100644 --- a/LabelStoreMax/android/app/src/main/res/values/styles.xml +++ b/LabelStoreMax/android/app/src/main/res/values/styles.xml @@ -1,8 +1,18 @@ + + + diff --git a/LabelStoreMax/android/build.gradle b/LabelStoreMax/android/build.gradle index 3151321..71eb9a2 100644 --- a/LabelStoreMax/android/build.gradle +++ b/LabelStoreMax/android/build.gradle @@ -1,12 +1,15 @@ buildscript { - ext.kotlin_version = '1.3.10' + ext.kotlin_version = '1.3.50' repositories { google() jcenter() + maven { + url "https://maven.google.com" + } } dependencies { - classpath 'com.android.tools.build:gradle:3.5.1' + classpath 'com.android.tools.build:gradle:3.5.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -15,9 +18,6 @@ allprojects { repositories { google() jcenter() - maven { - url "https://maven.google.com" - } } } diff --git a/LabelStoreMax/android/gradle.properties b/LabelStoreMax/android/gradle.properties index 1515360..a673820 100644 --- a/LabelStoreMax/android/gradle.properties +++ b/LabelStoreMax/android/gradle.properties @@ -1,5 +1,4 @@ org.gradle.jvmargs=-Xmx1536M - android.useAndroidX=true android.enableJetifier=true android.enableR8=true diff --git a/LabelStoreMax/android/gradle/wrapper/gradle-wrapper.properties b/LabelStoreMax/android/gradle/wrapper/gradle-wrapper.properties index 17932ee..296b146 100644 --- a/LabelStoreMax/android/gradle/wrapper/gradle-wrapper.properties +++ b/LabelStoreMax/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Oct 28 17:45:00 GMT 2019 +#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/LabelStoreMax/android/key.properties b/LabelStoreMax/android/key.properties deleted file mode 100644 index 15e7dde..0000000 --- a/LabelStoreMax/android/key.properties +++ /dev/null @@ -1,10 +0,0 @@ -storePassword="" -keyPassword="" -keyAlias=key -storeFile="" - -#update the above. Check out https://flutter.dev/docs/deployment/android for more info -#storePassword= -#keyPassword= -#keyAlias=key -#storeFile=/key.jks> diff --git a/LabelStoreMax/android/settings.gradle b/LabelStoreMax/android/settings.gradle index 5a2f14f..44e62bc 100644 --- a/LabelStoreMax/android/settings.gradle +++ b/LabelStoreMax/android/settings.gradle @@ -1,15 +1,11 @@ include ':app' -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/LabelStoreMax/flutter_application_id.yaml b/LabelStoreMax/flutter_application_id.yaml new file mode 100644 index 0000000..5142322 --- /dev/null +++ b/LabelStoreMax/flutter_application_id.yaml @@ -0,0 +1,12 @@ +# APP CONFIGURATION +# Updates the package name and display name for your app + +# Run in the terminal: flutter pub run flutter_application_id:main + +flutter_application_id: + android: + id: "com.woosignal.label-android" + name: "Label StoreMax" + ios: + id: "com.woosignal.label-ios" + name: "Label StoreMax" \ No newline at end of file diff --git a/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj b/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj index 7d298ff..7eb44f8 100644 --- a/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj +++ b/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj @@ -169,7 +169,6 @@ TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = YPEM49WRL2; LastSwiftMigration = 0910; }; }; @@ -271,6 +270,7 @@ "${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", @@ -288,6 +288,7 @@ "${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", @@ -392,7 +393,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = YPEM49WRL2; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -526,7 +527,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = YPEM49WRL2; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -556,7 +557,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = YPEM49WRL2; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/LabelStoreMax/ios/Runner/Info.plist b/LabelStoreMax/ios/Runner/Info.plist index 30a62dd..85550a6 100644 --- a/LabelStoreMax/ios/Runner/Info.plist +++ b/LabelStoreMax/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - label_storemax + Label StoreMax CFBundlePackageType APPL CFBundleShortVersionString @@ -58,4 +58,4 @@ UIViewControllerBasedStatusBarAppearance - + \ No newline at end of file diff --git a/LabelStoreMax/lib/helpers/app_themes.dart b/LabelStoreMax/lib/helpers/app_themes.dart index 6ea55be..42e46c8 100644 --- a/LabelStoreMax/lib/helpers/app_themes.dart +++ b/LabelStoreMax/lib/helpers/app_themes.dart @@ -9,6 +9,7 @@ // 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'; import 'package:label_storemax/helpers/tools.dart'; @@ -41,16 +42,16 @@ TextTheme textThemeAccent() { fontFamily: appFontFamily, fontWeight: FontWeight.w800), bodyText1: new TextStyle( - color: HexColor("#606060"), + color: Hexcolor("#606060"), fontFamily: appFontFamily, fontWeight: FontWeight.w700), bodyText2: new TextStyle( - color: HexColor("#a8a8a8"), + color: Hexcolor("#a8a8a8"), fontFamily: appFontFamily, fontWeight: FontWeight.w700, fontSize: 18), caption: new TextStyle( - color: HexColor("#2a5080"), + color: Hexcolor("#2a5080"), fontFamily: appFontFamily, fontWeight: FontWeight.w700, fontSize: 14), @@ -90,16 +91,16 @@ TextTheme textThemePrimary() { fontFamily: appFontFamily, fontWeight: FontWeight.w800), bodyText1: new TextStyle( - color: HexColor("#606060"), + color: Hexcolor("#606060"), fontFamily: appFontFamily, fontWeight: FontWeight.w700), bodyText2: new TextStyle( - color: HexColor("#a8a8a8"), + color: Hexcolor("#a8a8a8"), fontFamily: appFontFamily, fontWeight: FontWeight.w700, fontSize: 18), caption: new TextStyle( - color: HexColor("#2a5080"), + color: Hexcolor("#2a5080"), fontFamily: appFontFamily, fontWeight: FontWeight.w700, fontSize: 14), diff --git a/LabelStoreMax/lib/helpers/tools.dart b/LabelStoreMax/lib/helpers/tools.dart index 38c66bb..8af0994 100644 --- a/LabelStoreMax/lib/helpers/tools.dart +++ b/LabelStoreMax/lib/helpers/tools.dart @@ -48,18 +48,6 @@ PaymentType addPayment(PaymentType paymentType) { return app_payment_methods.contains(paymentType.name) ? paymentType : null; } -class HexColor extends Color { - static int _getColorFromHex(String hexColor) { - hexColor = hexColor.toUpperCase().replaceAll("#", ""); - if (hexColor.length == 6) { - hexColor = "FF" + hexColor; - } - return int.parse(hexColor, radix: 16); - } - - HexColor(final String hexColor) : super(_getColorFromHex(hexColor)); -} - showStatusAlert(context, {@required String title, String subtitle, IconData icon, int duration}) { StatusAlert.show( diff --git a/LabelStoreMax/lib/labelconfig.dart b/LabelStoreMax/lib/labelconfig.dart index 322a9ab..aaea561 100644 --- a/LabelStoreMax/lib/labelconfig.dart +++ b/LabelStoreMax/lib/labelconfig.dart @@ -16,7 +16,7 @@ import 'dart:ui'; Developer Notes SUPPORT EMAIL - support@woosignal.com - VERSION - 2.1.1 + VERSION - 2.2.0 https://woosignal.com */ diff --git a/LabelStoreMax/lib/main.dart b/LabelStoreMax/lib/main.dart index c3883c2..476e59c 100644 --- a/LabelStoreMax/lib/main.dart +++ b/LabelStoreMax/lib/main.dart @@ -10,6 +10,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:hexcolor/hexcolor.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'; @@ -38,7 +39,6 @@ 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:label_storemax/helpers/tools.dart'; import 'package:page_transition/page_transition.dart'; import 'package:label_storemax/helpers/app_themes.dart'; import 'package:label_storemax/helpers/app_localizations.dart'; @@ -84,7 +84,7 @@ void main() async { case '/account-landing': return PageTransition( child: AccountLandingPage(), - type: PageTransitionType.downToUp, + type: PageTransitionType.bottomToTop, ); case '/browse-category': @@ -132,7 +132,9 @@ void main() async { final Map args = settings.arguments; return PageTransition( child: ProductImageViewerPage( - initialIndex: args["index"], arrImageSrc: args["images"]), + initialIndex: args["index"], + arrImageSrc: args["images"], + ), type: PageTransitionType.fade); } return PageTransition( @@ -173,7 +175,7 @@ void main() async { case '/checkout-details': return PageTransition( child: CheckoutDetailsPage(), - type: PageTransitionType.downToUp, + type: PageTransitionType.bottomToTop, ); case '/about': @@ -185,19 +187,19 @@ void main() async { case '/checkout-payment-type': return PageTransition( child: CheckoutPaymentTypePage(), - type: PageTransitionType.downToUp, + type: PageTransitionType.bottomToTop, ); case '/checkout-shipping-type': return PageTransition( child: CheckoutShippingTypePage(), - type: PageTransitionType.downToUp, + type: PageTransitionType.bottomToTop, ); case '/home-search': return PageTransition( child: HomeSearchPage(), - type: PageTransitionType.downToUp, + type: PageTransitionType.bottomToTop, ); default: return null; @@ -215,11 +217,11 @@ void main() async { return locale; }, theme: ThemeData( - primaryColor: HexColor("#2f4ffe"), + primaryColor: Hexcolor("#2f4ffe"), backgroundColor: Colors.white, buttonTheme: ButtonThemeData( hoverColor: Colors.transparent, - buttonColor: HexColor("#529cda"), + buttonColor: Hexcolor("#529cda"), colorScheme: colorSchemeButton(), minWidth: double.infinity, height: 70, diff --git a/LabelStoreMax/lib/pages/account_billing_details.dart b/LabelStoreMax/lib/pages/account_billing_details.dart index 384ab21..73a37c6 100644 --- a/LabelStoreMax/lib/pages/account_billing_details.dart +++ b/LabelStoreMax/lib/pages/account_billing_details.dart @@ -10,6 +10,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:label_storemax/helpers/shared_pref/sp_auth.dart'; import 'package:label_storemax/helpers/tools.dart'; import 'package:label_storemax/widgets/app_loader.dart'; @@ -180,7 +181,7 @@ class _AccountBillingDetailsPageState extends State { borderRadius: BorderRadius.circular(10), boxShadow: [ BoxShadow( - color: HexColor("#e8e8e8"), + color: Hexcolor("#e8e8e8"), blurRadius: 15.0, spreadRadius: 0, offset: Offset( diff --git a/LabelStoreMax/lib/pages/account_detail.dart b/LabelStoreMax/lib/pages/account_detail.dart index fca2a93..09cda0e 100644 --- a/LabelStoreMax/lib/pages/account_detail.dart +++ b/LabelStoreMax/lib/pages/account_detail.dart @@ -11,6 +11,7 @@ import 'package:bubble_tab_indicator/bubble_tab_indicator.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:label_storemax/helpers/shared_pref/sp_auth.dart'; import 'package:label_storemax/helpers/shared_pref/sp_user_id.dart'; import 'package:label_storemax/helpers/tools.dart'; @@ -344,7 +345,7 @@ class _AccountDetailPageState extends State decoration: BoxDecoration( border: Border( bottom: BorderSide( - color: HexColor("#fcfcfc"), + color: Hexcolor("#fcfcfc"), width: 1, ), ), diff --git a/LabelStoreMax/lib/pages/account_order_detail.dart b/LabelStoreMax/lib/pages/account_order_detail.dart index bae6acf..779a774 100644 --- a/LabelStoreMax/lib/pages/account_order_detail.dart +++ b/LabelStoreMax/lib/pages/account_order_detail.dart @@ -10,6 +10,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:label_storemax/helpers/tools.dart'; import 'package:label_storemax/widgets/app_loader.dart'; import 'package:label_storemax/widgets/woosignal_ui.dart'; @@ -119,7 +120,7 @@ class _AccountOrderDetailPageState extends State { decoration: BoxDecoration( border: Border( bottom: BorderSide( - color: HexColor("#fcfcfc"), width: 1), + color: Hexcolor("#fcfcfc"), width: 1), ), ), child: Row( diff --git a/LabelStoreMax/lib/pages/account_shipping_details.dart b/LabelStoreMax/lib/pages/account_shipping_details.dart index 79acc2e..2dc9a1e 100644 --- a/LabelStoreMax/lib/pages/account_shipping_details.dart +++ b/LabelStoreMax/lib/pages/account_shipping_details.dart @@ -10,6 +10,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:label_storemax/helpers/shared_pref/sp_auth.dart'; import 'package:label_storemax/helpers/tools.dart'; import 'package:label_storemax/widgets/app_loader.dart'; @@ -199,7 +200,7 @@ class _AccountShippingDetailsPageState borderRadius: BorderRadius.circular(10), boxShadow: [ BoxShadow( - color: HexColor("#e8e8e8"), + color: Hexcolor("#e8e8e8"), blurRadius: 15.0, // has the effect of softening the shadow spreadRadius: 0, diff --git a/LabelStoreMax/lib/pages/cart.dart b/LabelStoreMax/lib/pages/cart.dart index 3be945c..9925026 100644 --- a/LabelStoreMax/lib/pages/cart.dart +++ b/LabelStoreMax/lib/pages/cart.dart @@ -175,8 +175,10 @@ class _CartPageState extends State { return Scaffold( resizeToAvoidBottomPadding: false, appBar: AppBar( - title: Text(trans(context, "Shopping Cart"), - style: Theme.of(context).appBarTheme.textTheme.headline6), + title: Text( + trans(context, "Shopping Cart"), + style: Theme.of(context).appBarTheme.textTheme.headline6, + ), textTheme: Theme.of(context).textTheme, elevation: 1, actions: [ diff --git a/LabelStoreMax/lib/pages/checkout_confirmation.dart b/LabelStoreMax/lib/pages/checkout_confirmation.dart index 862b046..b3776fb 100644 --- a/LabelStoreMax/lib/pages/checkout_confirmation.dart +++ b/LabelStoreMax/lib/pages/checkout_confirmation.dart @@ -81,7 +81,8 @@ class CheckoutConfirmationPageState extends State { return; } - if (CheckoutSession.getInstance.billingDetails.shippingAddress == null) { + if (CheckoutSession.getInstance.billingDetails == null || + CheckoutSession.getInstance.billingDetails.shippingAddress == null) { setState(() { _showFullLoader = false; }); @@ -210,16 +211,20 @@ class CheckoutConfirmationPageState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - ((CheckoutSession.getInstance.billingDetails - .billingAddress != - null) + ((CheckoutSession.getInstance.billingDetails != null && + CheckoutSession.getInstance.billingDetails + .billingAddress != + null) ? wsCheckoutRow(context, heading: trans( context, "Billing/shipping details"), leadImage: Icon(Icons.home), - leadTitle: (CheckoutSession.getInstance - .billingDetails.billingAddress - .hasMissingFields() + leadTitle: (CheckoutSession + .getInstance.billingDetails == + null || + CheckoutSession.getInstance + .billingDetails.billingAddress + .hasMissingFields() ? trans( context, "Billing address is incomplete") : CheckoutSession.getInstance @@ -228,11 +233,9 @@ class CheckoutConfirmationPageState extends State { action: _actionCheckoutDetails, showBorderBottom: true) : wsCheckoutRow(context, - heading: trans( - context, "Billing/shipping details"), + heading: trans(context, "Billing/shipping details"), leadImage: Icon(Icons.home), - leadTitle: trans(context, - "Add billing & shipping details"), + leadTitle: trans(context, "Add billing & shipping details"), action: _actionCheckoutDetails, showBorderBottom: true)), (CheckoutSession.getInstance.paymentType != null @@ -389,7 +392,8 @@ class CheckoutConfirmationPageState extends State { if (doubleTotal < doubleMinimumValue) { showEdgeAlertWith(context, title: trans(context, "Sorry"), - desc: "${trans(context, "Spend a minimum of")} ${formatDoubleCurrency(total: doubleMinimumValue)} ${trans(context, "for")} ${CheckoutSession.getInstance.shippingType.getTitle()}", + desc: + "${trans(context, "Spend a minimum of")} ${formatDoubleCurrency(total: doubleMinimumValue)} ${trans(context, "for")} ${CheckoutSession.getInstance.shippingType.getTitle()}", style: EdgeAlertStyle.INFO, duration: 3); return; diff --git a/LabelStoreMax/lib/pages/checkout_shipping_type.dart b/LabelStoreMax/lib/pages/checkout_shipping_type.dart index 5573a0d..7bc4dd8 100644 --- a/LabelStoreMax/lib/pages/checkout_shipping_type.dart +++ b/LabelStoreMax/lib/pages/checkout_shipping_type.dart @@ -115,20 +115,18 @@ class _CheckoutShippingTypePageState extends State { } if (_shipping.methods.freeShipping != null) { - List freeShipping = _shipping.methods.freeShipping - .where((t) => t != null) - .toList(); + List freeShipping = + _shipping.methods.freeShipping.where((t) => t != null).toList(); for (int i = 0; i < freeShipping.length; i++) { if (isNumeric(freeShipping[i].cost) || freeShipping[i].cost == 'min_amount') { - if (freeShipping[i].cost == 'min_amount') { String total = await Cart.getInstance.getTotal(); if (total != null) { double doubleTotal = double.parse(total); double doubleMinimumValue = - double.parse(freeShipping[i].minimumOrderAmount); + double.parse(freeShipping[i].minimumOrderAmount); if (doubleTotal < doubleMinimumValue) { continue; diff --git a/LabelStoreMax/lib/pages/home.dart b/LabelStoreMax/lib/pages/home.dart index db4a23c..62b3521 100644 --- a/LabelStoreMax/lib/pages/home.dart +++ b/LabelStoreMax/lib/pages/home.dart @@ -71,6 +71,7 @@ class _HomePageState extends State { return; } waitForNextRequest = true; + List products = await appWooSignal((api) => api.getProducts( perPage: 50, page: _page, status: "publish", stockStatus: "instock")); _page = _page + 1; diff --git a/LabelStoreMax/lib/widgets/app_loader.dart b/LabelStoreMax/lib/widgets/app_loader.dart index 1a24d64..febdae8 100644 --- a/LabelStoreMax/lib/widgets/app_loader.dart +++ b/LabelStoreMax/lib/widgets/app_loader.dart @@ -10,8 +10,8 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; -import '../helpers/tools.dart'; +import 'package:hexcolor/hexcolor.dart'; Widget showAppLoader() { - return SpinKitDoubleBounce(color: HexColor("#393318")); + return SpinKitDoubleBounce(color: Hexcolor("#393318")); } diff --git a/LabelStoreMax/lib/widgets/buttons.dart b/LabelStoreMax/lib/widgets/buttons.dart index 6521219..ec2382c 100644 --- a/LabelStoreMax/lib/widgets/buttons.dart +++ b/LabelStoreMax/lib/widgets/buttons.dart @@ -10,9 +10,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:label_storemax/widgets/woosignal_ui.dart'; - -import '../helpers/tools.dart'; +import 'package:hexcolor/hexcolor.dart'; Widget wsPrimaryButton(BuildContext context, {@required String title, void Function() action}) { @@ -45,7 +43,7 @@ Widget wsSecondaryButton(BuildContext context, textAlign: TextAlign.center, ), onPressed: action, - color: HexColor("#f6f6f9"), + color: Hexcolor("#f6f6f9"), elevation: 1, ), ); diff --git a/LabelStoreMax/lib/widgets/woosignal_ui.dart b/LabelStoreMax/lib/widgets/woosignal_ui.dart index 7f00731..993420f 100644 --- a/LabelStoreMax/lib/widgets/woosignal_ui.dart +++ b/LabelStoreMax/lib/widgets/woosignal_ui.dart @@ -10,6 +10,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:label_storemax/labelconfig.dart'; import 'package:label_storemax/models/cart.dart'; import 'package:label_storemax/models/cart_line_item.dart'; @@ -193,7 +194,7 @@ Widget widgetCheckoutMeta(BuildContext context, {String title, String amount}) { List wsBoxShadow({double blurRadius}) { return [ BoxShadow( - color: HexColor("#e8e8e8"), + color: Hexcolor("#e8e8e8"), blurRadius: blurRadius ?? 15.0, spreadRadius: 0, offset: Offset( diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index 89176c4..39a195c 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,15 +1,18 @@ -# Label StoreMax -# Version 2.1.1 -#authors: - "Anthony Gordon" -#documentation: https://woosignal.com/docs/app/ios/label-storemax -#homepage: https://woosignal.com/ +# Official WooSignal App Template for WooCommerce -### App Config -# 1 Open: "lib/labelconfig.dart" +# Label StoreMax +# Version 2.2.0 +# Homepage: https://woosignal.com +# Author: Anthony Gordon +# Documentation: https://woosignal.com/docs/app/ios/label-storemax + +### App Configuration +# 1 Open: "lib/labelconfig.dart" and edit the variables +# 2 Open: "flutter_application_id.yaml" and update package name and display name ### Change App Icon # 1 Replace: assets/icon/appicon.png (1024px1024px icon size) -# 2 Run this command from Terminal: flutter pub run flutter_launcher_icons:main +# 2 Run this command from terminal: "flutter pub run flutter_launcher_icons:main" ### Uploading the IOS/Android app # IOS https://flutter.dev/docs/deployment/ios @@ -24,30 +27,31 @@ environment: sdk: ">=2.1.0 <3.0.0" dependencies: - woosignal: ^1.1.2 + woosignal: ^1.2.0 woosignal_stripe: ^0.0.6 razorpay_flutter: ^1.2.2 wp_json_api: ^0.1.4 - shared_preferences: ^0.5.7+3 - cached_network_image: ^2.2.0+1 - page_transition: ^1.1.5 + shared_preferences: ^0.5.12 + cached_network_image: ^2.3.2+1 + page_transition: ^1.1.7+2 package_info: ^0.4.0+16 - url_launcher: ^5.4.11 + url_launcher: ^5.7.2 flutter_money_formatter: ^0.8.3 platform_alert_dialog: ^1.0.0+2 - flutter_web_browser: ^0.11.0 - pull_to_refresh: ^1.5.8 + flutter_web_browser: ^0.12.0 + pull_to_refresh: ^1.6.2 intl: ^0.16.1 flutter_swiper: ^1.1.6 edge_alert: ^0.0.1 bubble_tab_indicator: ^0.1.4 status_alert: ^0.1.2 - math_expressions: ^2.0.0 + math_expressions: ^2.0.1 + hexcolor: ^1.0.4 flutter_spinkit: ^4.1.2+1 - flutter_launcher_icons: ^0.7.5 + flutter_launcher_icons: ^0.8.1 auto_size_text: ^2.1.0 html: ^0.14.0+3 - flutter_staggered_grid_view: ^0.3.1 + flutter_staggered_grid_view: ^0.3.2 flutter: sdk: flutter @@ -57,6 +61,7 @@ dependencies: cupertino_icons: ^0.1.3 dev_dependencies: + flutter_application_id: "^1.0.0" flutter_test: sdk: flutter