From c9804072873a3b9b4ed6815209e6263af0156991 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 4 Mar 2023 12:41:33 +0700 Subject: [PATCH] v6.5.0 updates --- LabelStoreMax/CHANGELOG.md | 7 + LabelStoreMax/README.md | 2 +- LabelStoreMax/lang/de.json | 3 +- LabelStoreMax/lang/en.json | 3 +- LabelStoreMax/lang/es.json | 3 +- LabelStoreMax/lang/fr.json | 3 +- LabelStoreMax/lang/hi.json | 3 +- LabelStoreMax/lang/it.json | 3 +- LabelStoreMax/lang/nl.json | 3 +- LabelStoreMax/lang/pt.json | 3 +- LabelStoreMax/lang/tr.json | 3 +- LabelStoreMax/lang/zh.json | 3 +- .../lib/app/models/billing_details.dart | 31 +++ .../lib/app/models/customer_address.dart | 3 +- .../app/networking/dio/base_api_service.dart | 3 +- .../app/providers/payments/stripe_pay.dart | 41 ++- LabelStoreMax/lib/bootstrap/app.dart | 10 +- LabelStoreMax/lib/bootstrap/extensions.dart | 140 ++++++++++ LabelStoreMax/lib/bootstrap/helpers.dart | 52 ++-- LabelStoreMax/lib/config/design.dart | 2 +- LabelStoreMax/lib/config/storage_keys.dart | 16 ++ .../resources/pages/account_landing_page.dart | 5 +- .../resources/pages/browse_category_page.dart | 3 +- .../lib/resources/pages/cart_page.dart | 28 +- .../pages/checkout_confirmation_page.dart | 255 +++++++++++------- .../pages/checkout_payment_type_page.dart | 44 +-- .../pages/checkout_shipping_type_page.dart | 96 +++---- .../resources/pages/checkout_status_page.dart | 79 +++--- .../lib/resources/themes/dark_theme.dart | 10 +- .../lib/resources/themes/light_theme.dart | 14 +- .../themes/text_theme/default_text_theme.dart | 2 +- .../resources/widgets/app_version_widget.dart | 30 +-- .../lib/resources/widgets/buttons.dart | 3 +- .../resources/widgets/cart_icon_widget.dart | 40 ++- .../checkout_coupon_amount_widget.dart | 34 +-- .../checkout_shipping_type_widget.dart | 2 +- .../checkout_store_heading_widget.dart | 3 - .../resources/widgets/compo_home_widget.dart | 10 +- .../resources/widgets/notic_home_widget.dart | 4 +- .../product_detail_description_widget.dart | 6 +- ...roduct_detail_related_products_widget.dart | 6 +- .../widgets/product_detail_upsell_widget.dart | 6 +- .../lib/resources/widgets/woosignal_ui.dart | 154 +++++------ LabelStoreMax/lib/routes/router.dart | 2 +- LabelStoreMax/pubspec.lock | 30 +-- LabelStoreMax/pubspec.yaml | 8 +- README.md | 2 +- 47 files changed, 738 insertions(+), 475 deletions(-) create mode 100644 LabelStoreMax/lib/bootstrap/extensions.dart create mode 100644 LabelStoreMax/lib/config/storage_keys.dart diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 4065ea4..6e4a868 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,10 @@ +## [6.5.0] - 2023-03-04 + +* When making payments via Stripe, it will now save the card for later. +* Small UI changes to the checkout confirmation page. +* New translation added. +* Pubspec.yaml dependency updates. + ## [6.4.1] - 2023-02-23 * Upgrade to Nylo v4.1.3 diff --git a/LabelStoreMax/README.md b/LabelStoreMax/README.md index 72a0c0c..10dcadf 100644 --- a/LabelStoreMax/README.md +++ b/LabelStoreMax/README.md @@ -4,7 +4,7 @@ # WooCommerce App: Label StoreMax -### Label StoreMax - v6.4.1 +### Label StoreMax - v6.5.0 [Official WooSignal WooCommerce App](https://woosignal.com) diff --git a/LabelStoreMax/lang/de.json b/LabelStoreMax/lang/de.json index 4ac1812..3ce45a0 100644 --- a/LabelStoreMax/lang/de.json +++ b/LabelStoreMax/lang/de.json @@ -227,5 +227,6 @@ "Are you sure?": "Bist du dir sicher?", "Yes, delete my account": "Ja, lösche mein Konto", "Account deleted": "Konto gelöscht", - "Shipping is not supported for your location, sorry": "Der Versand wird für Ihren Standort nicht unterstützt, tut mir leid" + "Shipping is not supported for your location, sorry": "Der Versand wird für Ihren Standort nicht unterstützt, tut mir leid", + "Order Summary": "Bestellübersicht" } \ No newline at end of file diff --git a/LabelStoreMax/lang/en.json b/LabelStoreMax/lang/en.json index 5fa9518..4960ec5 100644 --- a/LabelStoreMax/lang/en.json +++ b/LabelStoreMax/lang/en.json @@ -227,5 +227,6 @@ "Are you sure?": "Are you sure?", "Yes, delete my account": "Yes, delete my account", "Account deleted": "Account deleted", - "Shipping is not supported for your location, sorry": "Shipping is not supported for your location, sorry" + "Shipping is not supported for your location, sorry": "Shipping is not supported for your location, sorry", + "Order Summary": "Order Summary" } \ No newline at end of file diff --git a/LabelStoreMax/lang/es.json b/LabelStoreMax/lang/es.json index a682a53..b3cfcd2 100644 --- a/LabelStoreMax/lang/es.json +++ b/LabelStoreMax/lang/es.json @@ -227,5 +227,6 @@ "Are you sure?": "¿Está seguro?", "Yes, delete my account": "Sí, eliminar mi cuenta", "Account deleted": "Cuenta borrada", - "Shipping is not supported for your location, sorry": "El envío no es compatible para su ubicación, lo siento" + "Shipping is not supported for your location, sorry": "El envío no es compatible para su ubicación, lo siento", + "Order Summary": "Resumen del pedido" } \ No newline at end of file diff --git a/LabelStoreMax/lang/fr.json b/LabelStoreMax/lang/fr.json index 75696c0..cd8da0b 100644 --- a/LabelStoreMax/lang/fr.json +++ b/LabelStoreMax/lang/fr.json @@ -227,5 +227,6 @@ "Are you sure?": "Êtes-vous sûr?", "Yes, delete my account": "Oui, supprimer mon compte", "Account deleted": "Compte supprimé", - "Shipping is not supported for your location, sorry": "L'expédition n'est pas prise en charge pour votre emplacement, désolé" + "Shipping is not supported for your location, sorry": "L'expédition n'est pas prise en charge pour votre emplacement, désolé", + "Order Summary": "Récapitulatif de la commande" } \ No newline at end of file diff --git a/LabelStoreMax/lang/hi.json b/LabelStoreMax/lang/hi.json index 39de5c5..13c6a57 100644 --- a/LabelStoreMax/lang/hi.json +++ b/LabelStoreMax/lang/hi.json @@ -227,5 +227,6 @@ "Are you sure?": "kya aapako yakeen hai?", "Yes, delete my account": "haan, mera akaunt dileet kar do", "Account deleted": "khaata hataaya gaya", - "Shipping is not supported for your location, sorry": "aapake sthaan ke lie shiping samarthit nahin hai, kshama karen" + "Shipping is not supported for your location, sorry": "aapake sthaan ke lie shiping samarthit nahin hai, kshama karen", + "Order Summary": "aadesh saaraansh" } \ No newline at end of file diff --git a/LabelStoreMax/lang/it.json b/LabelStoreMax/lang/it.json index 1eac0eb..7601321 100644 --- a/LabelStoreMax/lang/it.json +++ b/LabelStoreMax/lang/it.json @@ -227,5 +227,6 @@ "Are you sure?": "Sei sicuro?", "Yes, delete my account": "Sì, elimina il mio account", "Account deleted": "Account cancellato", - "Shipping is not supported for your location, sorry": "La spedizione non è supportata per la tua posizione, mi dispiace" + "Shipping is not supported for your location, sorry": "La spedizione non è supportata per la tua posizione, mi dispiace", + "Order Summary": "Riepilogo dell'ordine" } \ No newline at end of file diff --git a/LabelStoreMax/lang/nl.json b/LabelStoreMax/lang/nl.json index bb58665..c3cd167 100644 --- a/LabelStoreMax/lang/nl.json +++ b/LabelStoreMax/lang/nl.json @@ -227,5 +227,6 @@ "Are you sure?": "Weet je het zeker?", "Yes, delete my account": "Ja, verwijder mijn account", "Account deleted": "Account verwijderd", - "Shipping is not supported for your location, sorry": "Verzending wordt niet ondersteund voor uw locatie, sorry" + "Shipping is not supported for your location, sorry": "Verzending wordt niet ondersteund voor uw locatie, sorry", + "Order Summary": "Overzicht van de bestelling" } \ No newline at end of file diff --git a/LabelStoreMax/lang/pt.json b/LabelStoreMax/lang/pt.json index 577d4fd..12b6df0 100644 --- a/LabelStoreMax/lang/pt.json +++ b/LabelStoreMax/lang/pt.json @@ -227,5 +227,6 @@ "Are you sure?": "Tem certeza?", "Yes, delete my account": "Sim, excluir minha conta", "Account deleted": "Conta excluída", - "Shipping is not supported for your location, sorry": "O envio não é suportado para a sua localização, desculpe" + "Shipping is not supported for your location, sorry": "O envio não é suportado para a sua localização, desculpe", + "Order Summary": "Resumo do pedido" } \ No newline at end of file diff --git a/LabelStoreMax/lang/tr.json b/LabelStoreMax/lang/tr.json index c2f13fc..e6e5ebf 100644 --- a/LabelStoreMax/lang/tr.json +++ b/LabelStoreMax/lang/tr.json @@ -227,5 +227,6 @@ "Are you sure?": "Emin misin?", "Yes, delete my account": "Evet, hesabımı sil", "Account deleted": "Hesap silindi", - "Shipping is not supported for your location, sorry": "Bulunduğunuz yer için gönderim desteklenmiyor, üzgünüm" + "Shipping is not supported for your location, sorry": "Bulunduğunuz yer için gönderim desteklenmiyor, üzgünüm", + "Order Summary": "Sipariş özeti" } \ No newline at end of file diff --git a/LabelStoreMax/lang/zh.json b/LabelStoreMax/lang/zh.json index 40e5dc7..0f28ec5 100644 --- a/LabelStoreMax/lang/zh.json +++ b/LabelStoreMax/lang/zh.json @@ -227,5 +227,6 @@ "Are you sure?": "你确定吗?", "Yes, delete my account": "是的,删除我的帐户", "Account deleted": "帐号已删除", - "Shipping is not supported for your location, sorry": "您所在的位置不支持送货,抱歉" + "Shipping is not supported for your location, sorry": "您所在的位置不支持送货,抱歉", + "Order Summary": "订单摘要" } \ No newline at end of file diff --git a/LabelStoreMax/lib/app/models/billing_details.dart b/LabelStoreMax/lib/app/models/billing_details.dart index 53a82f4..68c15b7 100644 --- a/LabelStoreMax/lib/app/models/billing_details.dart +++ b/LabelStoreMax/lib/app/models/billing_details.dart @@ -22,6 +22,37 @@ class BillingDetails { shippingAddress = CustomerAddress(); } + Map createStripeDetails() => { + 'address': { + if (billingAddress?.addressLine != null) + 'line1': billingAddress?.addressLine, + if (billingAddress?.city != null) 'city': billingAddress?.city, + if (billingAddress?.postalCode != null) + 'postal_code': billingAddress?.postalCode, + if (billingAddress?.customerCountry?.state?.name != null) + 'state': billingAddress?.customerCountry?.state?.name, + if (billingAddress?.customerCountry?.countryCode != null) + 'country': billingAddress?.customerCountry?.countryCode, + }, + 'shipping': { + if (shippingAddress?.nameFull() != null) + 'name': shippingAddress?.nameFull(), + if (shippingAddress?.city != null) 'city': shippingAddress?.city, + if (shippingAddress?.postalCode != null) + 'postal_code': shippingAddress?.postalCode, + if (shippingAddress?.customerCountry?.state?.name != null) + 'state': shippingAddress?.customerCountry?.state?.name, + if (shippingAddress?.customerCountry?.countryCode != null) + 'country': shippingAddress?.customerCountry?.countryCode, + }, + if (billingAddress?.emailAddress != null) + 'email': billingAddress?.emailAddress, + if (billingAddress?.nameFull() != null) + 'name': billingAddress?.nameFull(), + if (billingAddress?.phoneNumber != null) + 'phone': billingAddress?.phoneNumber + }; + Map getShippingAddressStripe() => { "name": shippingAddress?.nameFull(), "line1": shippingAddress!.addressLine, diff --git a/LabelStoreMax/lib/app/models/customer_address.dart b/LabelStoreMax/lib/app/models/customer_address.dart index 3bd61f2..2697fe3 100644 --- a/LabelStoreMax/lib/app/models/customer_address.dart +++ b/LabelStoreMax/lib/app/models/customer_address.dart @@ -167,8 +167,7 @@ class CustomerAddress { WpMetaData(key: "${type}_phone", value: phoneNumber), if (type != "shipping") WpMetaData(key: "${type}_email", value: emailAddress), - WpMetaData( - key: "${type}_country", value: customerCountry?.countryCode), + WpMetaData(key: "${type}_country", value: customerCountry?.countryCode), WpMetaData( key: "${type}_state", value: customerCountry?.state?.code diff --git a/LabelStoreMax/lib/app/networking/dio/base_api_service.dart b/LabelStoreMax/lib/app/networking/dio/base_api_service.dart index d9c1495..ecd836d 100644 --- a/LabelStoreMax/lib/app/networking/dio/base_api_service.dart +++ b/LabelStoreMax/lib/app/networking/dio/base_api_service.dart @@ -14,7 +14,6 @@ class BaseApiService extends NyBaseApiService { /// Default interceptors @override final interceptors = { - if (getEnv('APP_DEBUG') == true) - LoggingInterceptor: LoggingInterceptor() + if (getEnv('APP_DEBUG') == true) LoggingInterceptor: LoggingInterceptor() }; } diff --git a/LabelStoreMax/lib/app/providers/payments/stripe_pay.dart b/LabelStoreMax/lib/app/providers/payments/stripe_pay.dart index 668f93c..b58c1af 100644 --- a/LabelStoreMax/lib/app/providers/payments/stripe_pay.dart +++ b/LabelStoreMax/lib/app/providers/payments/stripe_pay.dart @@ -47,16 +47,17 @@ stripePay(context, } try { - dynamic rsp = {}; + Map? rsp = {}; // // CHECKOUT HELPER await checkout(taxRate, (total, billingDetails, cart) async { String cartShortDesc = await cart.cartShortDesc(); - rsp = await appWooSignal((api) => api.stripePaymentIntent( + rsp = await appWooSignal((api) => api.stripePaymentIntentV2( amount: total, email: billingDetails?.billingAddress?.emailAddress, desc: cartShortDesc, shipping: billingDetails?.getShippingAddressStripe(), + customerDetails: billingDetails?.createStripeDetails(), )); }); @@ -71,17 +72,37 @@ stripePay(context, } await Stripe.instance.initPaymentSheet( - paymentSheetParameters: SetupPaymentSheetParameters( - style: Theme.of(state.context).brightness == Brightness.light - ? ThemeMode.light - : ThemeMode.dark, - merchantDisplayName: - envVal('APP_NAME', defaultValue: wooSignalApp?.appName), - paymentIntentClientSecret: rsp['client_secret'], - )); + paymentSheetParameters: SetupPaymentSheetParameters( + style: Theme.of(state.context).brightness == Brightness.light + ? ThemeMode.light + : ThemeMode.dark, + merchantDisplayName: + envVal('APP_NAME', defaultValue: wooSignalApp?.appName), + customerId: rsp!['customer'], + paymentIntentClientSecret: rsp!['client_secret'], + customerEphemeralKeySecret: rsp!['ephemeral_key'], + setupIntentClientSecret: rsp!['setup_intent_secret']), + ); await Stripe.instance.presentPaymentSheet(); + PaymentIntent paymentIntent = + await Stripe.instance.retrievePaymentIntent(rsp!['client_secret']); + + if (paymentIntent.status == PaymentIntentsStatus.Unknown) { + showToastNotification( + context, + title: trans("Oops!"), + description: trans("Something went wrong, please try again."), + icon: Icons.payment, + style: ToastNotificationStyleType.WARNING, + ); + } + + if (paymentIntent.status != PaymentIntentsStatus.Succeeded) { + return; + } + state.reloadState(showLoader: true); OrderWC orderWC = await buildOrderWC(taxRate: taxRate); diff --git a/LabelStoreMax/lib/bootstrap/app.dart b/LabelStoreMax/lib/bootstrap/app.dart index f1cd85a..be31e3b 100644 --- a/LabelStoreMax/lib/bootstrap/app.dart +++ b/LabelStoreMax/lib/bootstrap/app.dart @@ -60,7 +60,8 @@ class AppBuild extends StatelessWidget { @override Widget build(BuildContext context) { Nylo nylo = Backpack.instance.read('nylo'); - List appThemes = nylo.appThemes.map((appTheme) => appTheme.toAppTheme()).toList(); + List appThemes = + nylo.appThemes.map((appTheme) => appTheme.toAppTheme()).toList(); return LocalizedApp( child: ThemeProvider( themes: appThemes, @@ -89,7 +90,12 @@ class AppBuild extends StatelessWidget { title: title ?? "", initialRoute: initialRoute, onGenerateRoute: onGenerateRoute, - darkTheme: darkTheme ?? appThemes.firstWhere((theme) => theme.id == getEnv('DARK_THEME_ID'), orElse: () => appThemes.first).data, + darkTheme: darkTheme ?? + appThemes + .firstWhere( + (theme) => theme.id == getEnv('DARK_THEME_ID'), + orElse: () => appThemes.first) + .data, theme: themeData ?? ThemeProvider.themeOf(context).data, localeResolutionCallback: (Locale? locale, Iterable supportedLocales) { diff --git a/LabelStoreMax/lib/bootstrap/extensions.dart b/LabelStoreMax/lib/bootstrap/extensions.dart new file mode 100644 index 0000000..d27aea5 --- /dev/null +++ b/LabelStoreMax/lib/bootstrap/extensions.dart @@ -0,0 +1,140 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_app/bootstrap/helpers.dart'; +import 'package:flutter_app/resources/themes/styles/color_styles.dart'; + +extension NyText on Text { + /// Set the Style to use [displayLarge]. + Text displayLarge(BuildContext context) { + return setStyle(Theme.of(context).textTheme.displayLarge); + } + + /// Set the Style to use [displayMedium]. + Text displayMedium(BuildContext context) { + return setStyle(Theme.of(context).textTheme.displayMedium); + } + + /// Set the Style to use [displaySmall]. + Text displaySmall(BuildContext context) { + return setStyle(Theme.of(context).textTheme.displaySmall); + } + + /// Set the Style to use [headlineLarge]. + Text headingLarge(BuildContext context) { + return setStyle(Theme.of(context).textTheme.headlineLarge); + } + + /// Set the Style to use [headlineMedium]. + Text headingMedium(BuildContext context) { + return setStyle(Theme.of(context).textTheme.headlineMedium); + } + + /// Set the Style to use [headlineSmall]. + Text headingSmall(BuildContext context) { + return setStyle(Theme.of(context).textTheme.headlineSmall); + } + + /// Set the Style to use [titleLarge]. + Text titleLarge(BuildContext context) { + return setStyle(Theme.of(context).textTheme.titleLarge); + } + + /// Set the Style to use [titleMedium]. + Text titleMedium(BuildContext context) { + return setStyle(Theme.of(context).textTheme.titleMedium); + } + + /// Set the Style to use [titleSmall]. + Text titleSmall(BuildContext context) { + return setStyle(Theme.of(context).textTheme.titleSmall); + } + + /// Set the Style to use [bodyLarge]. + Text large(BuildContext context) { + return setStyle(Theme.of(context).textTheme.bodyLarge); + } + + /// Set the Style to use [bodyMedium]. + Text medium(BuildContext context) { + return setStyle(Theme.of(context).textTheme.bodyMedium); + } + + /// Set the Style to use [bodySmall]. + Text small(BuildContext context) { + return setStyle(Theme.of(context).textTheme.bodySmall); + } + + /// Make the font bold. + Text fontWeightBold() { + return copyWith(style: TextStyle(fontWeight: FontWeight.bold)); + } + + /// Make the font light. + Text fontWeightLight() { + return copyWith(style: TextStyle(fontWeight: FontWeight.w300)); + } + + /// Change the [style]. + Text setStyle(TextStyle? style) => copyWith(style: style); + + /// Sets the color from your [ColorStyles] or [Color]. + Text setColor( + BuildContext context, Color Function(ColorStyles color) newColor, + {String? themeId}) { + return copyWith( + style: TextStyle( + color: newColor(ThemeColor.get(context, themeId: themeId)))); + } + + /// Aligns text to the left. + Text alignLeft() { + return copyWith(textAlign: TextAlign.left); + } + + /// Aligns text to the right. + Text alignRight() { + return copyWith(textAlign: TextAlign.right); + } + + /// Aligns text to the center. + Text alignCenter() { + return copyWith(textAlign: TextAlign.center); + } + + /// Aligns text to the center. + Text setMaxLines(int maxLines) { + return copyWith(maxLines: maxLines); + } + + /// Change the [fontFamily]. + Text setFontFamily(String fontFamily) => + copyWith(style: TextStyle(fontFamily: fontFamily)); + + /// Helper to apply changes. + Text copyWith( + {Key? key, + StrutStyle? strutStyle, + TextAlign? textAlign, + TextDirection? textDirection = TextDirection.ltr, + Locale? locale, + bool? softWrap, + TextOverflow? overflow, + double? textScaleFactor, + int? maxLines, + String? semanticsLabel, + TextWidthBasis? textWidthBasis, + TextStyle? style}) { + return Text(data ?? "", + key: key ?? this.key, + strutStyle: strutStyle ?? this.strutStyle, + textAlign: textAlign ?? this.textAlign, + textDirection: textDirection ?? this.textDirection, + locale: locale ?? this.locale, + softWrap: softWrap ?? this.softWrap, + overflow: overflow ?? this.overflow, + textScaleFactor: textScaleFactor ?? this.textScaleFactor, + maxLines: maxLines ?? this.maxLines, + semanticsLabel: semanticsLabel ?? this.semanticsLabel, + textWidthBasis: textWidthBasis ?? this.textWidthBasis, + style: style != null ? this.style?.merge(style) ?? style : this.style); + } +} diff --git a/LabelStoreMax/lib/bootstrap/helpers.dart b/LabelStoreMax/lib/bootstrap/helpers.dart index 6a75209..da58b0e 100644 --- a/LabelStoreMax/lib/bootstrap/helpers.dart +++ b/LabelStoreMax/lib/bootstrap/helpers.dart @@ -54,20 +54,24 @@ Future appWooSignal(Function(WooSignal) api) async { /// helper to find correct color from the [context]. class ThemeColor { static ColorStyles get(BuildContext context, {String? themeId}) { - Nylo nylo = Backpack.instance.read('nylo'); - List> appThemes = nylo.appThemes as List>; + List> appThemes = + nylo.appThemes as List>; if (themeId == null) { - BaseThemeConfig themeFound = appThemes - .firstWhere( - (theme) => theme.id == getEnv(Theme.of(context).brightness == Brightness.light ? 'LIGHT_THEME_ID' : 'DARK_THEME_ID'), - orElse: () => appThemes.first - ); + BaseThemeConfig themeFound = appThemes.firstWhere( + (theme) => + theme.id == + getEnv(Theme.of(context).brightness == Brightness.light + ? 'LIGHT_THEME_ID' + : 'DARK_THEME_ID'), + orElse: () => appThemes.first); return themeFound.colors; } - BaseThemeConfig baseThemeConfig = appThemes.firstWhere((theme) => theme.id == themeId, orElse: () => appThemes.first); + BaseThemeConfig baseThemeConfig = appThemes.firstWhere( + (theme) => theme.id == themeId, + orElse: () => appThemes.first); return baseThemeConfig.colors; } } @@ -80,7 +84,7 @@ extension ColorsHelper on TextStyle { } } -List getPaymentTypes() { +Future> getPaymentTypes() async { List paymentTypes = []; for (var appPaymentGateway in appPaymentGateways) { if (paymentTypes.firstWhere( @@ -501,7 +505,8 @@ class UserAuth { } Future> getDefaultShipping() async { - String data = await rootBundle.loadString('public/assets/json/default_shipping.json'); + String data = + await rootBundle.loadString('public/assets/json/default_shipping.json'); dynamic dataJson = json.decode(data); List shipping = []; @@ -520,30 +525,40 @@ Future> getDefaultShipping() async { } Future findCountryMetaForShipping(String countryCode) async { - List defaultShipping = await getDefaultShipping(); - List shippingByCountryCode = defaultShipping.where((element) => element.code == countryCode).toList(); + List defaultShipping = await getDefaultShipping(); + List shippingByCountryCode = + defaultShipping.where((element) => element.code == countryCode).toList(); if (shippingByCountryCode.isNotEmpty) { return shippingByCountryCode.first; } return null; } -DefaultShippingState? findDefaultShippingStateByCode(DefaultShipping defaultShipping, String code) { - List defaultShippingStates = defaultShipping.states.where((state) => state.code == code).toList(); +DefaultShippingState? findDefaultShippingStateByCode( + DefaultShipping defaultShipping, String code) { + List defaultShippingStates = + defaultShipping.states.where((state) => state.code == code).toList(); if (defaultShippingStates.isEmpty) { return null; } DefaultShippingState defaultShippingState = defaultShippingStates.first; - return DefaultShippingState(code: defaultShippingState.code, name: defaultShippingState.name); + return DefaultShippingState( + code: defaultShippingState.code, name: defaultShippingState.name); } bool hasKeyInMeta(WPUserInfoResponse wpUserInfoResponse, String key) { - return (wpUserInfoResponse.data!.metaData ?? []).where((meta) => meta.key == key).toList().isNotEmpty; + return (wpUserInfoResponse.data!.metaData ?? []) + .where((meta) => meta.key == key) + .toList() + .isNotEmpty; } String fetchValueInMeta(WPUserInfoResponse wpUserInfoResponse, String key) { String value = ""; - List? metaDataValue = (wpUserInfoResponse.data!.metaData ?? []).where((meta) => meta.key == key).first.value; + List? metaDataValue = (wpUserInfoResponse.data!.metaData ?? []) + .where((meta) => meta.key == key) + .first + .value; if (metaDataValue != null && metaDataValue.isNotEmpty) { return metaDataValue.first ?? ""; } @@ -592,7 +607,8 @@ removeWishlistProduct({required Product? product}) async { await NyStorage.store(SharedKey.wishlistProducts, json); } -Future billingDetailsFromWpUserInfoResponse(wpUserInfoResponse) async { +Future billingDetailsFromWpUserInfoResponse( + wpUserInfoResponse) async { List metaDataAddress = [ 'billing_first_name', 'billing_last_name', diff --git a/LabelStoreMax/lib/config/design.dart b/LabelStoreMax/lib/config/design.dart index 5c668c3..667cee6 100644 --- a/LabelStoreMax/lib/config/design.dart +++ b/LabelStoreMax/lib/config/design.dart @@ -15,4 +15,4 @@ Widget logo = StoreLogo(); // resources/widgets/woosignal_ui.dart Widget loader = AppLoaderWidget(); -// resources/widgets/app_loader_widget.dart \ No newline at end of file +// resources/widgets/app_loader_widget.dart diff --git a/LabelStoreMax/lib/config/storage_keys.dart b/LabelStoreMax/lib/config/storage_keys.dart new file mode 100644 index 0000000..786ca6b --- /dev/null +++ b/LabelStoreMax/lib/config/storage_keys.dart @@ -0,0 +1,16 @@ +/* +|-------------------------------------------------------------------------- +| Storage Keys +| Add your storage keys here and then use them later to retrieve data. +| E.g. static String userCoins = "USER_COINS"; +| String coins = NyStorage.read( StorageKey.userCoins ); +| +| Learn more: https://nylo.dev/docs/4.x/storage#storage-keys +|-------------------------------------------------------------------------- +*/ + +class StorageKey { + static String userToken = "USER_TOKEN"; + + /// Add your storage keys here... +} diff --git a/LabelStoreMax/lib/resources/pages/account_landing_page.dart b/LabelStoreMax/lib/resources/pages/account_landing_page.dart index c519606..1d7ec1d 100644 --- a/LabelStoreMax/lib/resources/pages/account_landing_page.dart +++ b/LabelStoreMax/lib/resources/pages/account_landing_page.dart @@ -64,7 +64,10 @@ class _AccountLandingPageState extends NyState { child: Text( trans("Login"), textAlign: TextAlign.left, - style: Theme.of(context).textTheme.headlineMedium!.copyWith( + style: Theme.of(context) + .textTheme + .headlineMedium! + .copyWith( fontSize: 24, fontWeight: FontWeight.w700, ), diff --git a/LabelStoreMax/lib/resources/pages/browse_category_page.dart b/LabelStoreMax/lib/resources/pages/browse_category_page.dart index 10260d2..2c68fbf 100644 --- a/LabelStoreMax/lib/resources/pages/browse_category_page.dart +++ b/LabelStoreMax/lib/resources/pages/browse_category_page.dart @@ -62,7 +62,8 @@ class _BrowseCategoryPageState extends NyState { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(trans("Browse"), style: Theme.of(context).textTheme.titleMedium), + Text(trans("Browse"), + style: Theme.of(context).textTheme.titleMedium), Text(parseHtmlString(productCategory!.name)) ], ), diff --git a/LabelStoreMax/lib/resources/pages/cart_page.dart b/LabelStoreMax/lib/resources/pages/cart_page.dart index 3011f5d..44ca588 100644 --- a/LabelStoreMax/lib/resources/pages/cart_page.dart +++ b/LabelStoreMax/lib/resources/pages/cart_page.dart @@ -266,26 +266,16 @@ class _CartPageState extends State { Divider( color: Colors.black45, ), - FutureBuilder( + NyFutureBuilder( future: Cart.getInstance.getTotal(withFormat: true), - builder: (BuildContext context, AsyncSnapshot snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return Text(""); - default: - if (snapshot.hasError) { - return Text(""); - } else { - return Padding( - child: TextRowWidget( - title: trans("Total"), - text: (_isLoading ? "" : snapshot.data), - ), - padding: EdgeInsets.only(bottom: 15, top: 15), - ); - } - } - }, + child: (BuildContext context, data) => Padding( + child: TextRowWidget( + title: trans("Total"), + text: (_isLoading ? "" : data), + ), + padding: EdgeInsets.only(bottom: 15, top: 15), + ), + loading: SizedBox.shrink(), ), PrimaryButton( title: trans("PROCEED TO CHECKOUT"), diff --git a/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart b/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart index 109bc37..4cbcd14 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart @@ -9,12 +9,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import 'package:collection/collection.dart' show IterableExtension; +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_app/app/models/cart.dart'; import 'package:flutter_app/app/models/checkout_session.dart'; import 'package:flutter_app/app/models/customer_country.dart'; import 'package:flutter_app/app/models/payment_type.dart'; import 'package:flutter_app/bootstrap/app_helper.dart'; +import 'package:flutter_app/bootstrap/extensions.dart'; import 'package:flutter_app/bootstrap/helpers.dart'; import 'package:flutter_app/resources/widgets/app_loader_widget.dart'; import 'package:flutter_app/resources/widgets/buttons.dart'; @@ -38,23 +40,26 @@ class CheckoutConfirmationPage extends StatefulWidget { CheckoutConfirmationPageState(); } -class CheckoutConfirmationPageState extends State { +class CheckoutConfirmationPageState extends NyState { CheckoutConfirmationPageState(); bool _showFullLoader = true, _isProcessingPayment = false; - final List _taxRates = []; TaxRate? _taxRate; final WooSignalApp? _wooSignalApp = AppHelper.instance.appConfig; @override - void initState() { - super.initState(); + init() async { + super.init(); CheckoutSession.getInstance.coupon = null; - List paymentTypes = getPaymentTypes(); + List paymentTypes = await getPaymentTypes(); + if (CheckoutSession.getInstance.paymentType == null && paymentTypes.isNotEmpty) { - CheckoutSession.getInstance.paymentType = paymentTypes.first; + CheckoutSession.getInstance.paymentType = paymentTypes.firstWhere( + (paymentType) => paymentType?.id == 20, + orElse: () => paymentTypes.first); + print(CheckoutSession.getInstance.paymentType?.name); } _getTaxes(); } @@ -176,8 +181,15 @@ class CheckoutConfirmationPageState extends State { return Scaffold( appBar: AppBar( - title: Text(trans("Checkout")), - centerTitle: true, + title: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text(trans("Checkout")), + Text(_wooSignalApp?.appName ?? getEnv('APP_NAME')).small(context), + ], + ), + centerTitle: false, leading: Container( child: IconButton( icon: Icon(Icons.arrow_back_ios), @@ -191,95 +203,154 @@ class CheckoutConfirmationPageState extends State { ), resizeToAvoidBottomInset: false, body: SafeAreaWidget( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - padding: EdgeInsets.only(left: 10, right: 10), + child: Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: ListView( + shrinkWrap: true, + children: [ + CheckoutStoreHeadingWidget(), + CheckoutUserDetailsWidget( + context: context, + checkoutSession: checkoutSession, + resetState: () { + setState(() { + _showFullLoader = true; + }); + _getTaxes(); + }, + ), + CheckoutPaymentTypeWidget( + context: context, + checkoutSession: checkoutSession, + resetState: () => setState(() {}), + ), + CheckoutShippingTypeWidget( + context: context, + checkoutSession: checkoutSession, + resetState: () => setState(() {}), + wooSignalApp: _wooSignalApp, + ), + if (_wooSignalApp!.couponEnabled == true) + CheckoutSelectCouponWidget( + context: context, + checkoutSession: checkoutSession, + resetState: () => setState(() {}), + ), + Container( + decoration: BoxDecoration( + boxShadow: wsBoxShadow(), + color: Colors.white, + // borderRadius: BorderRadius.circular(16) + ), + padding: EdgeInsets.symmetric(vertical: 16), + margin: EdgeInsets.only(top: 20), + child: Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Row( + children: [ + Icon(Icons.receipt), + Padding(padding: EdgeInsets.only(right: 8),), + Text(trans("Order Summary")).fontWeightBold() + ], + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding(padding: EdgeInsets.only(top: 16)), + CheckoutSubtotal( + title: trans("Subtotal"), + ), + CheckoutCouponAmountWidget( + checkoutSession: checkoutSession), + if (_wooSignalApp!.disableShipping != 1) + CheckoutMetaLine( + title: trans("Shipping fee"), + amount: CheckoutSession + .getInstance.shippingType == + null + ? trans("Select shipping") + : CheckoutSession + .getInstance.shippingType! + .getTotal(withFormatting: true)), + if (_taxRate != null) + CheckoutTaxTotal(taxRate: _taxRate), + Padding(padding: EdgeInsets.only(top: 8, left: 8, right: 8)), + Padding(padding: EdgeInsets.symmetric(horizontal: 8), child: RichText( + textAlign: TextAlign.left, + text: TextSpan( + text: + 'By completing this order, I agree to all ', + style: Theme.of(context).textTheme.bodySmall!.copyWith( + fontSize: 12, + ), + children: [ + TextSpan( + recognizer: TapGestureRecognizer()..onTap = _openTermsLink, + text: "terms & conditions", + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith( + color: ThemeColor.get(context) + .primaryAccent, + fontSize: 12, + ), + ), + TextSpan( + text: ".", + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith( + color: Colors.black87, + fontSize: 12, + ), + ), + ], + ), + )), + ], + ), + ], + ), + ) + ], + ), + ), + Container( decoration: BoxDecoration( - color: ThemeColor.get(context).backgroundContainer, - borderRadius: BorderRadius.circular(10), - boxShadow: (Theme.of(context).brightness == Brightness.light) - ? wsBoxShadow() - : null, + borderRadius: BorderRadius.circular(16) ), - margin: EdgeInsets.only(top: 5, bottom: 5), child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - CheckoutStoreHeadingWidget(), - CheckoutUserDetailsWidget( - context: context, - checkoutSession: checkoutSession, - resetState: () { - setState(() { - _showFullLoader = true; - }); - _getTaxes(); - }, - ), - CheckoutPaymentTypeWidget( - context: context, - checkoutSession: checkoutSession, - resetState: () => setState(() {}), - ), - CheckoutShippingTypeWidget( - context: context, - checkoutSession: checkoutSession, - resetState: () => setState(() {}), - wooSignalApp: _wooSignalApp, - ), - ]), - ), - ), - if (_wooSignalApp!.couponEnabled == true) - CheckoutSelectCouponWidget( - context: context, - checkoutSession: checkoutSession, - resetState: () => setState(() {}), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Divider( - color: Colors.black12, - thickness: 1, + children: [ + CheckoutTotal(title: trans("Total"), taxRate: _taxRate), + Padding(padding: EdgeInsets.only(bottom: 8)), + PrimaryButton( + title: _isProcessingPayment + ? "${trans("PROCESSING")}..." + : trans("CHECKOUT"), + action: _isProcessingPayment ? null : _handleCheckout, + ), + ], ), - CheckoutSubtotal( - title: trans("Subtotal"), - ), - CheckoutCouponAmountWidget(checkoutSession: checkoutSession), - if (_wooSignalApp!.disableShipping != 1) - CheckoutMetaLine( - title: trans("Shipping fee"), - amount: CheckoutSession.getInstance.shippingType == null - ? trans("Select shipping") - : CheckoutSession.getInstance.shippingType! - .getTotal(withFormatting: true)), - if (_taxRate != null) CheckoutTaxTotal(taxRate: _taxRate), - CheckoutTotal(title: trans("Total"), taxRate: _taxRate), - Divider( - color: Colors.black12, - thickness: 1, - ), - ], - ), - PrimaryButton( - title: _isProcessingPayment - ? "${trans("PROCESSING")}..." - : trans("CHECKOUT"), - action: _isProcessingPayment ? null : _handleCheckout, - ), - ], + ) + ], + ), ), ), ); } + _openTermsLink() => openBrowserTab(url: AppHelper.instance.appConfig?.appTermsLink ?? ""); + _handleCheckout() async { CheckoutSession checkoutSession = CheckoutSession.getInstance; if (checkoutSession.billingDetails!.billingAddress == null) { @@ -368,8 +439,12 @@ class CheckoutConfirmationPageState extends State { _isProcessingPayment = true; }); - await checkoutSession.paymentType! - .pay(context, state: this, taxRate: _taxRate); + try { + await checkoutSession.paymentType! + .pay(context, state: this, taxRate: _taxRate); + } on Exception catch (e) { + print(e.toString()); + } setState(() { _isProcessingPayment = false; diff --git a/LabelStoreMax/lib/resources/pages/checkout_payment_type_page.dart b/LabelStoreMax/lib/resources/pages/checkout_payment_type_page.dart index 7e38461..8c6911c 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_payment_type_page.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_payment_type_page.dart @@ -25,28 +25,35 @@ class CheckoutPaymentTypePage extends StatefulWidget { _CheckoutPaymentTypePageState(); } -class _CheckoutPaymentTypePageState extends State { +class _CheckoutPaymentTypePageState extends NyState { _CheckoutPaymentTypePageState(); - @override - void initState() { - super.initState(); + List _paymentTypes = []; + @override + init() async { + super.init(); + + _paymentTypes = await getPaymentTypes(); + + if (_paymentTypes.isEmpty && + getEnv('APP_DEBUG', defaultValue: false) == true) { + NyLogger.info( + 'You have no payment methods set. Visit the WooSignal dashboard (https://woosignal.com/dashboard) to set a payment method.'); + } + + // print(CheckoutSession.getInstance.paymentType?.name); if (CheckoutSession.getInstance.paymentType == null) { - if (getPaymentTypes().isNotEmpty) { - CheckoutSession.getInstance.paymentType = getPaymentTypes().first; + if (_paymentTypes.isNotEmpty) { + CheckoutSession.getInstance.paymentType = _paymentTypes.firstWhere( + (paymentType) => paymentType?.id == 20, + orElse: () => _paymentTypes.first); } } } @override Widget build(BuildContext context) { - List paymentTypes = getPaymentTypes(); - if (paymentTypes.isEmpty && - getEnv('APP_DEBUG', defaultValue: false) == true) { - NyLogger.info( - 'You have no payment methods set. Visit the WooSignal dashboard (https://woosignal.com/dashboard) to set a payment method.'); - } return Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( @@ -76,7 +83,7 @@ class _CheckoutPaymentTypePageState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - child: paymentTypes.isEmpty + child: _paymentTypes.isEmpty ? Container( padding: EdgeInsets.only(top: 20), child: Text( @@ -86,11 +93,12 @@ class _CheckoutPaymentTypePageState extends State { ), ) : ListView.separated( - itemCount: paymentTypes.length, + itemCount: _paymentTypes.length, itemBuilder: (BuildContext context, int index) { PaymentType paymentType = - paymentTypes[index]!; + _paymentTypes[index]!; + return ListTile( contentPadding: EdgeInsets.only( top: 10, @@ -114,9 +122,9 @@ class _CheckoutPaymentTypePageState extends State { .textTheme .titleMedium), selected: true, - trailing: (CheckoutSession - .getInstance.paymentType == - paymentType + trailing: (CheckoutSession.getInstance + .paymentType?.id == + paymentType.id ? Icon(Icons.check) : null), onTap: () { diff --git a/LabelStoreMax/lib/resources/pages/checkout_shipping_type_page.dart b/LabelStoreMax/lib/resources/pages/checkout_shipping_type_page.dart index 58eedc0..d44a242 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_shipping_type_page.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_shipping_type_page.dart @@ -288,62 +288,48 @@ class _CheckoutShippingTypePageState extends State { ), ), selected: true, - subtitle: FutureBuilder( + subtitle: NyFutureBuilder( future: _getShippingPrice(index), - builder: (BuildContext context, - AsyncSnapshot - 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(''); - } else { - Map - shippingOption = - _wsShippingOptions[ - index]; - return RichText( - text: TextSpan( - text: '', - style: Theme.of(context) - .textTheme - .bodyMedium, - children: [ - (shippingOption[ - "object"] - is FreeShipping - ? TextSpan( - text: trans( - "Free postage"), - ) - : TextSpan( - text: - "${trans("Price")}: ${formatStringCurrency(total: snapshot.data)}", - )), - if (shippingOption[ - "min_amount"] != - null) - TextSpan( - text: - "\n${trans("Spend a minimum of")} ${formatStringCurrency(total: shippingOption["min_amount"])}", - style: Theme.of( - context) - .textTheme - .bodyMedium! - .copyWith( - fontSize: - 14)) - ], - ), - ); - } - } + child: (BuildContext context, + data) { + Map + shippingOption = + _wsShippingOptions[ + index]; + return RichText( + text: TextSpan( + text: '', + style: Theme.of(context) + .textTheme + .bodyMedium, + children: [ + (shippingOption[ + "object"] + is FreeShipping + ? TextSpan( + text: trans( + "Free postage"), + ) + : TextSpan( + text: + "${trans("Price")}: ${formatStringCurrency(total: data)}", + )), + if (shippingOption[ + "min_amount"] != + null) + TextSpan( + text: + "\n${trans("Spend a minimum of")} ${formatStringCurrency(total: shippingOption["min_amount"])}", + style: Theme.of( + context) + .textTheme + .bodyMedium! + .copyWith( + fontSize: + 14)) + ], + ), + ); }, ), trailing: (CheckoutSession.getInstance diff --git a/LabelStoreMax/lib/resources/pages/checkout_status_page.dart b/LabelStoreMax/lib/resources/pages/checkout_status_page.dart index 01a0284..49a0df5 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_status_page.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_status_page.dart @@ -125,46 +125,51 @@ class _CheckoutStatusState extends NyState { itemBuilder: (BuildContext context, int index) { ws_order.LineItems lineItem = _order!.lineItems![index]; return Container( - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - Text( - lineItem.name!, - style: - Theme.of(context).textTheme.bodyLarge, - softWrap: false, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - Text( - "x${lineItem.quantity.toString()}", - style: - Theme.of(context).textTheme.bodyMedium, - ), - ], - ), - ), - Text( - formatStringCurrency( - total: lineItem.total.toString(), - ), - style: Theme.of(context).textTheme.bodyLarge, - ) - ], - ), - padding: EdgeInsets.all(16), - margin: EdgeInsets.all(8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + boxShadow: wsBoxShadow(), color: (Theme.of(context).brightness == Brightness.light) ? Colors.white - : null); + : null, + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceAround, + children: [ + Text( + lineItem.name!, + style: + Theme.of(context).textTheme.bodyLarge, + softWrap: false, + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + Text( + "x${lineItem.quantity.toString()}", + style: + Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + ), + Text( + formatStringCurrency( + total: lineItem.total.toString(), + ), + style: Theme.of(context).textTheme.bodyLarge, + ) + ], + ), + padding: EdgeInsets.all(16), + margin: EdgeInsets.all(8), + ); }), ), Align( diff --git a/LabelStoreMax/lib/resources/themes/dark_theme.dart b/LabelStoreMax/lib/resources/themes/dark_theme.dart index f57d14f..884a1fc 100644 --- a/LabelStoreMax/lib/resources/themes/dark_theme.dart +++ b/LabelStoreMax/lib/resources/themes/dark_theme.dart @@ -25,8 +25,8 @@ ThemeData darkTheme(ColorStyles darkColors) { } } - TextTheme darkTheme = getAppTextTheme( - appFont, defaultTextTheme.merge(_textTheme(darkColors))); + TextTheme darkTheme = + getAppTextTheme(appFont, defaultTextTheme.merge(_textTheme(darkColors))); return ThemeData( primaryColor: darkColors.primaryContent, primaryColorDark: darkColors.primaryContent, @@ -64,7 +64,8 @@ ThemeData darkTheme(ColorStyles darkColors) { TextStyle(color: darkColors.bottomTabBarLabelSelected), selectedItemColor: darkColors.bottomTabBarLabelSelected, ), - textTheme: darkTheme, colorScheme: ColorScheme.dark().copyWith(background: darkColors.background), + textTheme: darkTheme, + colorScheme: ColorScheme.dark().copyWith(background: darkColors.background), ); } @@ -81,6 +82,5 @@ TextTheme _textTheme(ColorStyles colors) { titleLarge: TextStyle(color: primaryContent.withOpacity(0.8)), labelLarge: TextStyle(color: primaryContent.withOpacity(0.8)), bodySmall: TextStyle(color: primaryContent.withOpacity(0.8)), - bodyMedium: TextStyle(color: primaryContent.withOpacity(0.8)) - ); + bodyMedium: TextStyle(color: primaryContent.withOpacity(0.8))); } diff --git a/LabelStoreMax/lib/resources/themes/light_theme.dart b/LabelStoreMax/lib/resources/themes/light_theme.dart index ffcfe34..f7c42d1 100644 --- a/LabelStoreMax/lib/resources/themes/light_theme.dart +++ b/LabelStoreMax/lib/resources/themes/light_theme.dart @@ -25,8 +25,8 @@ ThemeData lightTheme(ColorStyles lightColors) { } } - TextTheme lightTheme = getAppTextTheme( - appFont, defaultTextTheme.merge(_textTheme(lightColors))); + TextTheme lightTheme = + getAppTextTheme(appFont, defaultTextTheme.merge(_textTheme(lightColors))); return ThemeData( primaryColor: lightColors.primaryContent, @@ -66,7 +66,9 @@ ThemeData lightTheme(ColorStyles lightColors) { TextStyle(color: lightColors.bottomTabBarLabelSelected), selectedItemColor: lightColors.bottomTabBarLabelSelected, ), - textTheme: lightTheme, colorScheme: ColorScheme.light().copyWith(background: lightColors.background), + textTheme: lightTheme, + colorScheme: + ColorScheme.light().copyWith(background: lightColors.background), ); } @@ -80,7 +82,7 @@ TextTheme _textTheme(ColorStyles colors) { Color primaryContent = colors.primaryContent; TextTheme textTheme = TextTheme().apply(displayColor: primaryContent); return textTheme.copyWith( - labelLarge: TextStyle(color: primaryContent.withOpacity(0.8)), - bodyMedium: TextStyle(color: primaryContent.withOpacity(0.8)), + labelLarge: TextStyle(color: primaryContent.withOpacity(0.8)), + bodyMedium: TextStyle(color: primaryContent.withOpacity(0.8)), ); -} \ No newline at end of file +} diff --git a/LabelStoreMax/lib/resources/themes/text_theme/default_text_theme.dart b/LabelStoreMax/lib/resources/themes/text_theme/default_text_theme.dart index 0846729..a3e5bc6 100644 --- a/LabelStoreMax/lib/resources/themes/text_theme/default_text_theme.dart +++ b/LabelStoreMax/lib/resources/themes/text_theme/default_text_theme.dart @@ -52,4 +52,4 @@ const TextTheme defaultTextTheme = TextTheme( bodySmall: TextStyle( fontSize: 16.0, ), -); \ No newline at end of file +); diff --git a/LabelStoreMax/lib/resources/widgets/app_version_widget.dart b/LabelStoreMax/lib/resources/widgets/app_version_widget.dart index ccc76a1..c95e7e4 100644 --- a/LabelStoreMax/lib/resources/widgets/app_version_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/app_version_widget.dart @@ -17,27 +17,17 @@ class AppVersionWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return FutureBuilder( + return NyFutureBuilder( future: PackageInfo.fromPlatform(), - builder: (BuildContext context, AsyncSnapshot 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("Version")}: ${snapshot.data!.version}", - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(fontWeight: FontWeight.w300)), - padding: EdgeInsets.only(top: 15, bottom: 15), - ); - } - }, + child: (BuildContext context, data) => Padding( + child: Text("${trans("Version")}: ${data.version}", + style: Theme.of(context) + .textTheme + .bodyMedium! + .copyWith(fontWeight: FontWeight.w300)), + padding: EdgeInsets.only(top: 15, bottom: 15), + ), + loading: SizedBox.shrink(), ); } } diff --git a/LabelStoreMax/lib/resources/widgets/buttons.dart b/LabelStoreMax/lib/resources/widgets/buttons.dart index dd8988b..8867ac8 100644 --- a/LabelStoreMax/lib/resources/widgets/buttons.dart +++ b/LabelStoreMax/lib/resources/widgets/buttons.dart @@ -120,7 +120,8 @@ class WooSignalButton extends StatelessWidget { style: ElevatedButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12.0), - ), backgroundColor: bgColor, + ), + backgroundColor: bgColor, padding: EdgeInsets.all(8), elevation: 0, shadowColor: Colors.transparent, diff --git a/LabelStoreMax/lib/resources/widgets/cart_icon_widget.dart b/LabelStoreMax/lib/resources/widgets/cart_icon_widget.dart index 3d8cb32..7565e84 100644 --- a/LabelStoreMax/lib/resources/widgets/cart_icon_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/cart_icon_widget.dart @@ -11,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_app/app/models/cart.dart'; import 'package:flutter_app/app/models/cart_line_item.dart'; +import 'package:nylo_framework/nylo_framework.dart'; class CartIconWidget extends StatefulWidget { CartIconWidget({Key? key}) : super(key: key); @@ -34,32 +35,23 @@ class _CartIconWidgetState extends State { ), Positioned.fill( child: Align( - child: FutureBuilder>( + child: NyFutureBuilder>( future: Cart.getInstance.getCart(), - builder: (BuildContext context, - AsyncSnapshot> snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return Text(""); - default: - if (snapshot.hasError) { - return Text(""); - } else { - List cartItems = - snapshot.data!.map((e) => e.quantity).toList(); - String cartValue = "0"; - if (cartItems.isNotEmpty) { - cartValue = cartItems - .reduce((value, element) => value! + element!) - .toString(); - } - return Text( - cartValue, - style: Theme.of(context).textTheme.bodyMedium, - textAlign: TextAlign.center, - ); - } + child: (BuildContext context, + data) { + List cartItems = + data.map((e) => e.quantity).toList(); + String cartValue = "0"; + if (cartItems.isNotEmpty) { + cartValue = cartItems + .reduce((value, element) => value! + element!) + .toString(); } + return Text( + cartValue, + style: Theme.of(context).textTheme.bodyMedium, + textAlign: TextAlign.center, + ); }, ), alignment: Alignment.topCenter, diff --git a/LabelStoreMax/lib/resources/widgets/checkout_coupon_amount_widget.dart b/LabelStoreMax/lib/resources/widgets/checkout_coupon_amount_widget.dart index 174f90f..6c2bd26 100644 --- a/LabelStoreMax/lib/resources/widgets/checkout_coupon_amount_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/checkout_coupon_amount_widget.dart @@ -12,7 +12,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_app/app/models/cart.dart'; import 'package:flutter_app/app/models/checkout_session.dart'; import 'package:flutter_app/bootstrap/helpers.dart'; -import 'package:flutter_app/resources/widgets/app_loader_widget.dart'; import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; import 'package:nylo_framework/nylo_framework.dart'; @@ -24,29 +23,18 @@ class CheckoutCouponAmountWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return FutureBuilder( + if (checkoutSession.coupon == null) { + return SizedBox.shrink(); + } + return NyFutureBuilder( future: Cart.getInstance.couponDiscountAmount(), - builder: (BuildContext context, AsyncSnapshot snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return AppLoaderWidget(); - default: - if (snapshot.hasError) { - return Text(""); - } else { - if (checkoutSession.coupon == null) { - return SizedBox.shrink(); - } - return Padding( - child: CheckoutMetaLine( - title: "${trans('Coupon')}: ${checkoutSession.coupon!.code}", - amount: "-" + formatStringCurrency(total: snapshot.data), - ), - padding: EdgeInsets.only(bottom: 0, top: 0), - ); - } - } - }, + child: (BuildContext context, data) => Padding( + child: CheckoutMetaLine( + title: "${trans('Coupon')}: ${checkoutSession.coupon?.code}", + amount: "-" + formatStringCurrency(total: data), + ), + padding: EdgeInsets.only(bottom: 0, top: 0), + ), ); } } diff --git a/LabelStoreMax/lib/resources/widgets/checkout_shipping_type_widget.dart b/LabelStoreMax/lib/resources/widgets/checkout_shipping_type_widget.dart index 8fa1cd8..fcd1272 100644 --- a/LabelStoreMax/lib/resources/widgets/checkout_shipping_type_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/checkout_shipping_type_widget.dart @@ -44,7 +44,7 @@ class CheckoutShippingTypeWidget extends StatelessWidget { ? checkoutSession.shippingType!.getTitle() : trans("Select a shipping option"), action: _actionSelectShipping, - showBorderBottom: false, + showBorderBottom: true, ); } diff --git a/LabelStoreMax/lib/resources/widgets/checkout_store_heading_widget.dart b/LabelStoreMax/lib/resources/widgets/checkout_store_heading_widget.dart index 3896faf..a37db4e 100644 --- a/LabelStoreMax/lib/resources/widgets/checkout_store_heading_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/checkout_store_heading_widget.dart @@ -18,9 +18,6 @@ class CheckoutStoreHeadingWidget extends StatelessWidget { Widget build(BuildContext context) { return Container( decoration: BoxDecoration( - boxShadow: (Theme.of(context).brightness == Brightness.light) - ? wsBoxShadow(blurRadius: 10) - : null, color: Colors.transparent, ), padding: EdgeInsets.all(2), diff --git a/LabelStoreMax/lib/resources/widgets/compo_home_widget.dart b/LabelStoreMax/lib/resources/widgets/compo_home_widget.dart index 0aef901..222a99f 100644 --- a/LabelStoreMax/lib/resources/widgets/compo_home_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/compo_home_widget.dart @@ -47,10 +47,10 @@ class _CompoHomeWidgetState extends State { for (var category in categories) { List products = await (appWooSignal( (api) => api.getProducts( - perPage: 10, - category: category.id.toString(), - status: "publish", - stockStatus: "instock", + perPage: 10, + category: category.id.toString(), + status: "publish", + stockStatus: "instock", ), )); if (products.isNotEmpty) { @@ -138,7 +138,7 @@ class _CompoHomeWidgetState extends State { children: [ Expanded( child: AutoSizeText( - catProds.key.name!, + parseHtmlString(catProds.key.name!), style: Theme.of(context) .textTheme .titleMedium! diff --git a/LabelStoreMax/lib/resources/widgets/notic_home_widget.dart b/LabelStoreMax/lib/resources/widgets/notic_home_widget.dart index ce9a97b..059bb86 100644 --- a/LabelStoreMax/lib/resources/widgets/notic_home_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/notic_home_widget.dart @@ -146,7 +146,9 @@ class _NoticHomeWidgetState extends State { Flexible( child: Text( trans("Our selection of new items"), - style: Theme.of(context).textTheme.headlineMedium, + style: Theme.of(context) + .textTheme + .headlineMedium, maxLines: 2, overflow: TextOverflow.ellipsis, ), diff --git a/LabelStoreMax/lib/resources/widgets/product_detail_description_widget.dart b/LabelStoreMax/lib/resources/widgets/product_detail_description_widget.dart index f00084b..bd99648 100644 --- a/LabelStoreMax/lib/resources/widgets/product_detail_description_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/product_detail_description_widget.dart @@ -40,8 +40,10 @@ class ProductDetailDescriptionWidget extends StatelessWidget { children: [ Text( trans("Description"), - style: - Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 18), + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith(fontSize: 18), textAlign: TextAlign.left, ), if (product!.shortDescription!.isNotEmpty && diff --git a/LabelStoreMax/lib/resources/widgets/product_detail_related_products_widget.dart b/LabelStoreMax/lib/resources/widgets/product_detail_related_products_widget.dart index caca811..2f395a8 100644 --- a/LabelStoreMax/lib/resources/widgets/product_detail_related_products_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/product_detail_related_products_widget.dart @@ -43,8 +43,10 @@ class ProductDetailRelatedProductsWidget extends StatelessWidget { children: [ Text( trans("Related products"), - style: - Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 18), + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith(fontSize: 18), textAlign: TextAlign.left, ), ], diff --git a/LabelStoreMax/lib/resources/widgets/product_detail_upsell_widget.dart b/LabelStoreMax/lib/resources/widgets/product_detail_upsell_widget.dart index 4ae93a4..e0f613e 100644 --- a/LabelStoreMax/lib/resources/widgets/product_detail_upsell_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/product_detail_upsell_widget.dart @@ -65,8 +65,10 @@ class _ProductDetailUpsellWidgetState extends State { children: [ Text( trans("${trans('You may also like')}…"), - style: - Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 18), + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith(fontSize: 18), textAlign: TextAlign.left, ), ], diff --git a/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart b/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart index 5d75846..d54ab46 100644 --- a/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart +++ b/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart @@ -16,7 +16,6 @@ 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/resources/widgets/app_loader_widget.dart'; import 'package:flutter_app/resources/widgets/cached_image_widget.dart'; import 'package:flutter_app/resources/widgets/no_results_for_products_widget.dart'; import 'package:flutter_app/resources/widgets/top_nav_widget.dart'; @@ -142,6 +141,7 @@ class CheckoutRowLine extends StatelessWidget { Widget build(BuildContext context) => Flexible( child: InkWell( child: Container( + height: 125, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, @@ -171,7 +171,8 @@ class CheckoutRowLine extends StatelessWidget { child: Container( child: Text( leadTitle!, - style: Theme.of(context).textTheme.titleMedium, + style: + Theme.of(context).textTheme.titleMedium, maxLines: 2, overflow: TextOverflow.ellipsis, softWrap: false, @@ -227,18 +228,17 @@ class TextEditingRow extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ - Flexible( - child: Padding( - child: AutoSizeText( - heading!, - style: Theme.of(context) - .textTheme - .bodyLarge! - .copyWith(color: ThemeColor.get(context).primaryContent), + if (heading != null) + Flexible( + child: Padding( + child: AutoSizeText( + heading!, + style: Theme.of(context).textTheme.bodyLarge!.copyWith( + color: ThemeColor.get(context).primaryContent), + ), + padding: EdgeInsets.only(bottom: 2), ), - padding: EdgeInsets.only(bottom: 2), ), - ), Flexible( child: TextField( controller: controller, @@ -253,7 +253,7 @@ class TextEditingRow extends StatelessWidget { ], ), padding: EdgeInsets.all(2), - height: 78, + height: heading == null ? 50 : 78, ); } @@ -263,26 +263,29 @@ class CheckoutMetaLine extends StatelessWidget { final String? title, amount; @override - Widget build(BuildContext context) => Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: Container( - child: AutoSizeText(title!, - style: Theme.of(context).textTheme.bodyMedium), + Widget build(BuildContext context) => Container( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + child: Container( + child: AutoSizeText(title!, + style: Theme.of(context).textTheme.bodyMedium!.copyWith(fontWeight: FontWeight.bold)), + ), + flex: 3, ), - flex: 3, - ), - Flexible( - child: Container( - child: - Text(amount!, style: Theme.of(context).textTheme.bodyLarge), - ), - flex: 3, - ) - ], - ); + Flexible( + child: Container( + child: + Text(amount!, style: Theme.of(context).textTheme.bodyLarge), + ), + flex: 3, + ) + ], + ), + ); } List wsBoxShadow({double? blurRadius}) => [ @@ -507,25 +510,15 @@ class CheckoutTotal extends StatelessWidget { final TaxRate? taxRate; @override - Widget build(BuildContext context) => FutureBuilder( - future: CheckoutSession.getInstance - .total(withFormat: true, taxRate: taxRate), - builder: (BuildContext context, AsyncSnapshot snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return AppLoaderWidget(); - default: - if (snapshot.hasError) { - return Text(""); - } else { - return Padding( - child: CheckoutMetaLine(title: title, amount: snapshot.data), - padding: EdgeInsets.only(bottom: 0, top: 15), - ); - } - } - }, - ); + Widget build(BuildContext context) => NyFutureBuilder( + future: CheckoutSession.getInstance + .total(withFormat: true, taxRate: taxRate), + child: (BuildContext context, data) => Padding( + child: CheckoutMetaLine(title: title, amount: data), + padding: EdgeInsets.only(bottom: 0, top: 15), + ), + loading: SizedBox.shrink(), + ); } class CheckoutTaxTotal extends StatelessWidget { @@ -534,28 +527,17 @@ class CheckoutTaxTotal extends StatelessWidget { final TaxRate? taxRate; @override - Widget build(BuildContext context) => FutureBuilder( + Widget build(BuildContext context) => NyFutureBuilder( future: Cart.getInstance.taxAmount(taxRate), - builder: (BuildContext context, AsyncSnapshot snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return AppLoaderWidget(); - default: - if (snapshot.hasError) { - return Text(""); - } else { - return (snapshot.data == "0" - ? Container() - : Padding( - child: CheckoutMetaLine( - title: trans("Tax"), - amount: formatStringCurrency(total: snapshot.data), - ), - padding: EdgeInsets.only(bottom: 0, top: 0), - )); - } - } - }, + child: (BuildContext context, data) => (data == "0" + ? Container() + : Padding( + child: CheckoutMetaLine( + title: trans("Tax"), + amount: formatStringCurrency(total: data), + ), + padding: EdgeInsets.only(bottom: 0, top: 0), + )), ); } @@ -565,26 +547,16 @@ class CheckoutSubtotal extends StatelessWidget { final String? title; @override - Widget build(BuildContext context) => FutureBuilder( + Widget build(BuildContext context) => NyFutureBuilder( future: Cart.getInstance.getSubtotal(withFormat: true), - builder: (BuildContext context, AsyncSnapshot snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return AppLoaderWidget(); - default: - if (snapshot.hasError) { - return Text(""); - } else { - return Padding( - child: CheckoutMetaLine( - title: title, - amount: snapshot.data, - ), - padding: EdgeInsets.only(bottom: 0, top: 0), - ); - } - } - }, + child: (BuildContext context, data) => Padding( + child: CheckoutMetaLine( + title: title, + amount: data, + ), + padding: EdgeInsets.only(bottom: 0, top: 0), + ), + loading: SizedBox.shrink(), ); } diff --git a/LabelStoreMax/lib/routes/router.dart b/LabelStoreMax/lib/routes/router.dart index e70cabf..c0ca1ec 100644 --- a/LabelStoreMax/lib/routes/router.dart +++ b/LabelStoreMax/lib/routes/router.dart @@ -106,4 +106,4 @@ appRouter() => nyRoutes((router) { router.route("/account-shipping-details", (context) => AccountShippingDetailsPage()); - }); +}); diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index 06da711..f31236a 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -205,10 +205,10 @@ packages: dependency: transitive description: name: dio - sha256: "9fdbf71baeb250fc9da847f6cb2052196f62c19906a3657adfc18631a667d316" + sha256: "3709d74615bba5e443eb141f6a7f4bcc4788f8fae6f743edadfb79c2a8e6287e" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.0.1" eventify: dependency: transitive description: @@ -330,10 +330,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: ce0e501cfc258907842238e4ca605e74b7fd1cdf04b3b43e86c43f3e40a1592c + sha256: "02dcaf49d405f652b7160e882bacfc02cb497041bb2eab2a49b1c393cf9aac12" url: "https://pub.dev" source: hosted - version: "0.11.0" + version: "0.12.0" flutter_localizations: dependency: "direct main" description: flutter @@ -529,10 +529,10 @@ packages: dependency: transitive description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.0.15" intl: dependency: "direct main" description: @@ -625,18 +625,18 @@ packages: dependency: "direct main" description: name: nylo_framework - sha256: "3cc0379e73a56b2f2864f5fd850fdc582fc1908c5c8025e96a3ae7dbd3efa2f2" + sha256: "9ed065fdd5570de42c5e96f6269740de7b568593c2af78584cdc38572cf52ebe" url: "https://pub.dev" source: hosted - version: "4.1.3" + version: "4.1.4" nylo_support: dependency: transitive description: name: nylo_support - sha256: b662441b463a1e68c1642cd2711af026f66fb2122ecc1ae331fc8300a7bc4be7 + sha256: e710481287d8c4db42b51e10a1a726cc6da7239fdd334e204eadda635a9766ff url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.3.1" octo_image: dependency: transitive description: @@ -865,10 +865,10 @@ packages: dependency: transitive description: name: shared_preferences - sha256: "5949029e70abe87f75cfe59d17bf5c397619c4b74a099b10116baeb34786fad9" + sha256: ee6257848f822b8481691f20c3e6d2bfee2e9eccb2a3d249907fcfb198c55b41 url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.0.18" shared_preferences_android: dependency: transitive description: @@ -1182,10 +1182,10 @@ packages: dependency: "direct main" description: name: woosignal - sha256: "0236c5a4568d39140be544b44cbabd9932a425f28285694e99d6daec85809fef" + sha256: "888629274da9083aca94102b45e963c92f820c8d6b8154eebf0424adfc4089c6" url: "https://pub.dev" source: hosted - version: "3.2.3" + version: "3.3.0" wp_json_api: dependency: "direct main" description: @@ -1219,5 +1219,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <4.0.0" + dart: ">=2.19.0 <3.0.0" flutter: ">=3.7.0-0" diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index f86d947..663d8f9 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,7 +1,7 @@ # Official WooSignal App Template for WooCommerce # Label StoreMax -# Version: 6.4.1 +# Version: 6.5.0 # Author: Anthony Gordon # Homepage: https://woosignal.com # Documentation: https://woosignal.com/docs/app/label-storemax @@ -28,8 +28,8 @@ dependencies: google_fonts: ^4.0.3 analyzer: ^4.2.0 intl: ^0.17.0 - nylo_framework: ^4.1.3 - woosignal: ^3.2.3 + nylo_framework: ^4.1.4 + woosignal: ^3.3.0 flutter_stripe: ^8.0.0+1 wp_json_api: ^3.3.2 cached_network_image: ^3.2.3 @@ -64,7 +64,7 @@ dependencies: collection: ^1.15.0 dev_dependencies: - flutter_launcher_icons: ^0.11.0 + flutter_launcher_icons: ^0.12.0 lints: ^2.0.0 flutter_test: sdk: flutter diff --git a/README.md b/README.md index 6236eea..bac9cb4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # WooCommerce App: Label StoreMax -### Label StoreMax - v6.3.1 +### Label StoreMax - v6.5.0 [Official WooSignal WooCommerce App](https://woosignal.com)