From c70f9d022d15c120f5e8446a46dd90e7eed60ca4 Mon Sep 17 00:00:00 2001 From: WooSignal Date: Thu, 4 Jun 2020 01:29:35 +0100 Subject: [PATCH] v2.0.8 Added pull to refresh, Pubspec.yaml updates, Bug fixes --- LabelStoreMax/CHANGELOG.md | 6 ++++++ LabelStoreMax/lib/app_payment_methods.dart | 2 +- LabelStoreMax/lib/helpers/tools.dart | 2 +- LabelStoreMax/lib/labelconfig.dart | 2 +- .../lib/pages/account_order_detail.dart | 17 +++++++++++------ LabelStoreMax/lib/pages/browse_category.dart | 11 +++++------ LabelStoreMax/lib/pages/browse_search.dart | 11 +++++------ .../lib/pages/checkout_confirmation.dart | 3 ++- LabelStoreMax/lib/pages/home.dart | 11 +++++------ LabelStoreMax/pubspec.lock | 4 ++-- LabelStoreMax/pubspec.yaml | 6 +++--- 11 files changed, 42 insertions(+), 33 deletions(-) diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 1986255..c8e996a 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,9 @@ +## [2.0.8] - 2020-06-04 + +* Added pull to refresh +* Pubspec.yaml updates +* Bug fixes + ## [2.0.7] - 2020-05-26 * New default locales added for Spanish, German, French, Hindi, Italian, Portuguese diff --git a/LabelStoreMax/lib/app_payment_methods.dart b/LabelStoreMax/lib/app_payment_methods.dart index 306649c..7a51bbf 100644 --- a/LabelStoreMax/lib/app_payment_methods.dart +++ b/LabelStoreMax/lib/app_payment_methods.dart @@ -58,4 +58,4 @@ List arrPaymentMethods = [ // pay: myCustomPaymentFunction // ), // ), -]; +].where((e) => e != null).toList(); diff --git a/LabelStoreMax/lib/helpers/tools.dart b/LabelStoreMax/lib/helpers/tools.dart index 8646091..8577a4a 100644 --- a/LabelStoreMax/lib/helpers/tools.dart +++ b/LabelStoreMax/lib/helpers/tools.dart @@ -479,7 +479,7 @@ Widget refreshableScroll(context, @required onTap, key}) { return SmartRefresher( - enablePullDown: false, + enablePullDown: true, enablePullUp: true, footer: CustomFooter( builder: (BuildContext context, LoadStatus mode) { diff --git a/LabelStoreMax/lib/labelconfig.dart b/LabelStoreMax/lib/labelconfig.dart index 9b55720..3ee95f0 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.0.7 + VERSION - 2.0.8 https://woosignal.com */ diff --git a/LabelStoreMax/lib/pages/account_order_detail.dart b/LabelStoreMax/lib/pages/account_order_detail.dart index eb98dd0..a495842 100644 --- a/LabelStoreMax/lib/pages/account_order_detail.dart +++ b/LabelStoreMax/lib/pages/account_order_detail.dart @@ -77,7 +77,9 @@ class _AccountOrderDetailPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Flexible(child: Text("${capitalize(trans(context, "Ships to"))}:")), + Flexible( + child: Text( + "${capitalize(trans(context, "Ships to"))}:")), Flexible( child: Text( [ @@ -152,13 +154,15 @@ class _AccountOrderDetailPageState extends State { children: [ Text( formatStringCurrency( - total: _order.lineItems[i].total,), + total: _order.lineItems[i].total, + ), style: Theme.of(context) .primaryTextTheme .bodyText2 .copyWith( - fontWeight: FontWeight.w600, - color: Colors.black,), + fontWeight: FontWeight.w600, + color: Colors.black, + ), textAlign: TextAlign.left, ), Text( @@ -169,8 +173,9 @@ class _AccountOrderDetailPageState extends State { .primaryTextTheme .bodyText1 .copyWith( - fontWeight: FontWeight.w600, - color: Colors.black,), + fontWeight: FontWeight.w600, + color: Colors.black, + ), textAlign: TextAlign.left, ), ], diff --git a/LabelStoreMax/lib/pages/browse_category.dart b/LabelStoreMax/lib/pages/browse_category.dart index 791484f..4d66b54 100644 --- a/LabelStoreMax/lib/pages/browse_category.dart +++ b/LabelStoreMax/lib/pages/browse_category.dart @@ -120,13 +120,12 @@ class _BrowseCategoryPageState extends State { } void _onRefresh() async { + _products = []; + _page = 1; + _shouldStopRequests = false; + waitForNextRequest = false; await _fetchMoreProducts(); - setState(() {}); - if (_shouldStopRequests) { - _refreshController.resetNoData(); - } else { - _refreshController.refreshCompleted(); - } + _refreshController.refreshCompleted(); } void _onLoading() async { diff --git a/LabelStoreMax/lib/pages/browse_search.dart b/LabelStoreMax/lib/pages/browse_search.dart index bcc5c5a..f4a8b2f 100644 --- a/LabelStoreMax/lib/pages/browse_search.dart +++ b/LabelStoreMax/lib/pages/browse_search.dart @@ -108,13 +108,12 @@ class _BrowseSearchState extends State { } void _onRefresh() async { + _products = []; + _page = 1; + _shouldStopRequests = false; + waitForNextRequest = false; await _fetchProductsForSearch(); - setState(() {}); - if (_shouldStopRequests) { - _refreshController.resetNoData(); - } else { - _refreshController.refreshCompleted(); - } + _refreshController.refreshCompleted(); } void _onLoading() async { diff --git a/LabelStoreMax/lib/pages/checkout_confirmation.dart b/LabelStoreMax/lib/pages/checkout_confirmation.dart index b02e909..f76b0b5 100644 --- a/LabelStoreMax/lib/pages/checkout_confirmation.dart +++ b/LabelStoreMax/lib/pages/checkout_confirmation.dart @@ -219,7 +219,8 @@ class CheckoutConfirmationPageState extends State { leadTitle: (CheckoutSession.getInstance .billingDetails.billingAddress .hasMissingFields() - ? trans(context, "Billing address is incomplete") + ? trans( + context, "Billing address is incomplete") : CheckoutSession.getInstance .billingDetails.billingAddress .addressFull()), diff --git a/LabelStoreMax/lib/pages/home.dart b/LabelStoreMax/lib/pages/home.dart index 5fe9fdc..bf27b70 100644 --- a/LabelStoreMax/lib/pages/home.dart +++ b/LabelStoreMax/lib/pages/home.dart @@ -193,13 +193,12 @@ class _HomePageState extends State { } void _onRefresh() async { + _products = []; + _page = 1; + _shouldStopRequests = false; + waitForNextRequest = false; await _fetchMoreProducts(); - setState(() {}); - if (_shouldStopRequests) { - _refreshController.resetNoData(); - } else { - _refreshController.refreshCompleted(); - } + _refreshController.refreshCompleted(); } void _onLoading() async { diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index 763a84d..7938a56 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -550,7 +550,7 @@ packages: name: woosignal url: "https://pub.dartlang.org" source: hosted - version: "1.0.8" + version: "1.0.9" woosignal_stripe: dependency: "direct main" description: @@ -564,7 +564,7 @@ packages: name: wp_json_api url: "https://pub.dartlang.org" source: hosted - version: "0.1.2" + version: "0.1.3" xml: dependency: transitive description: diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index e9e545d..5f6a0f2 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,5 +1,5 @@ # Label StoreMax -# Version 2.0.7 +# Version 2.0.8 #authors: - "Anthony Gordon" #documentation: https://woosignal.com/docs/app/ios/label-storemax #homepage: https://woosignal.com/ @@ -24,10 +24,10 @@ environment: sdk: ">=2.1.0 <3.0.0" dependencies: - woosignal: ^1.0.8 + woosignal: ^1.0.9 woosignal_stripe: ^0.0.4 razorpay_flutter: ^1.2.1 - wp_json_api: ^0.1.2 + wp_json_api: ^0.1.3 shared_preferences: ^0.5.7+3 cached_network_image: ^2.2.0+1 page_transition: ^1.1.5