From f0c7769b68ed3d94707761590642f8df795f7437 Mon Sep 17 00:00:00 2001 From: Anthony Gordon Date: Tue, 27 Apr 2021 22:24:28 +0100 Subject: [PATCH] v5.0.3 updates --- LabelStoreMax/CHANGELOG.md | 6 ++++++ LabelStoreMax/lib/bootstrap/helpers.dart | 3 +-- LabelStoreMax/lib/resources/pages/account_detail.dart | 6 ++++-- .../lib/resources/widgets/notic_theme_widget.dart | 10 ++++++---- LabelStoreMax/pubspec.lock | 8 ++++---- LabelStoreMax/pubspec.yaml | 8 ++++---- README.md | 2 +- 7 files changed, 26 insertions(+), 17 deletions(-) diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 637611c..9ec54b1 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,9 @@ +## [5.0.3] - 2020-04-27 + +* Fix issue account page when logged in for Notic theme +* Small tweak to helpers.dart +* Pubspec.yaml dependency updates + ## [5.0.2] - 2020-04-17 * Fix issue with PayPal checkout when using different locales diff --git a/LabelStoreMax/lib/bootstrap/helpers.dart b/LabelStoreMax/lib/bootstrap/helpers.dart index ba6361c..972a366 100644 --- a/LabelStoreMax/lib/bootstrap/helpers.dart +++ b/LabelStoreMax/lib/bootstrap/helpers.dart @@ -246,8 +246,7 @@ showToastNotification(BuildContext context, String parseHtmlString(String htmlString) { var document = parse(htmlString); - String parsedString = parse(document.body.text).documentElement.text; - return parsedString; + return parse(document.body.text).documentElement.text; } String moneyFormatter(double amount) { diff --git a/LabelStoreMax/lib/resources/pages/account_detail.dart b/LabelStoreMax/lib/resources/pages/account_detail.dart index 79fc288..36a5ddd 100644 --- a/LabelStoreMax/lib/resources/pages/account_detail.dart +++ b/LabelStoreMax/lib/resources/pages/account_detail.dart @@ -24,6 +24,8 @@ import 'package:wp_json_api/models/responses/wc_customer_info_response.dart'; import 'package:wp_json_api/wp_json_api.dart'; class AccountDetailPage extends StatefulWidget { + final bool showLeadingBackButton; + const AccountDetailPage({this.showLeadingBackButton = true}); @override _AccountDetailPageState createState() => _AccountDetailPageState(); } @@ -102,13 +104,13 @@ class _AccountDetailPageState extends State return Scaffold( appBar: AppBar( backgroundColor: Colors.transparent, - leading: Container( + leading: widget.showLeadingBackButton ? Container( child: IconButton( icon: Icon(Icons.arrow_back_ios), onPressed: () => Navigator.pop(context), ), margin: EdgeInsets.only(left: 0), - ), + ) : Container(), title: Text( trans(context, "Account"), style: Theme.of(context).textTheme.headline6, diff --git a/LabelStoreMax/lib/resources/widgets/notic_theme_widget.dart b/LabelStoreMax/lib/resources/widgets/notic_theme_widget.dart index 53004f6..998de29 100644 --- a/LabelStoreMax/lib/resources/widgets/notic_theme_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/notic_theme_widget.dart @@ -1,6 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_app/bootstrap/app_helper.dart'; +import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart'; +import 'package:flutter_app/resources/pages/account_detail.dart'; import 'package:flutter_app/resources/pages/account_landing.dart'; import 'package:flutter_app/resources/pages/cart.dart'; import 'package:flutter_app/resources/pages/home_search.dart'; @@ -62,13 +64,13 @@ class _NoticThemeWidgetState extends State { ); } - _onTabTapped(int i) { + _onTabTapped(int i) async { _currentIndex = i; - _changeMainWidget(); + await _changeMainWidget(); setState(() {}); } - _changeMainWidget() { + _changeMainWidget() async { switch (_currentIndex) { case 0: { @@ -87,7 +89,7 @@ class _NoticThemeWidgetState extends State { } case 3: { - activeWidget = AccountLandingPage(); + activeWidget = (await authCheck()) ? AccountDetailPage(showLeadingBackButton: false) : AccountLandingPage(); break; } } diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index 148cfd3..844ffdb 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -7,21 +7,21 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "20.0.0" + version: "21.0.0" adaptive_theme: dependency: "direct main" description: name: adaptive_theme url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.2.0" analyzer: dependency: "direct main" description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "1.5.0" animate_do: dependency: "direct main" description: @@ -538,7 +538,7 @@ packages: name: pull_to_refresh url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" + version: "1.6.5" queue: dependency: transitive description: diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index 55272ff..6ca8192 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,7 +1,7 @@ # Official WooSignal App Template for WooCommerce # Label StoreMax -# Version: 5.0.2 +# Version: 5.0.3 # Author: Anthony Gordon # Homepage: https://woosignal.com # Documentation: https://woosignal.com/docs/app/ios/label-storemax @@ -26,8 +26,8 @@ environment: dependencies: google_fonts: ^2.0.0 - analyzer: ^1.3.0 - adaptive_theme: ^2.0.0 + analyzer: ^1.5.0 + adaptive_theme: ^2.2.0 intl: ^0.17.0 page_transition: ^2.0.1-nullsafety.0 nylo_framework: ^0.8.2 @@ -41,7 +41,7 @@ dependencies: platform_alert_dialog: ^1.0.0+2 flutter_web_browser: ^0.14.0 flutter_webview_plugin: ^0.3.11 - pull_to_refresh: 1.6.4 + pull_to_refresh: 1.6.5 flutter_swiper: ^1.1.6 flutter_styled_toast: ^2.0.0 animate_do: ^2.0.0 diff --git a/README.md b/README.md index 278523a..fe239f4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # WooCommerce App: Label StoreMax -### Label StoreMax - v5.0.2 +### Label StoreMax - v5.0.3 [Official WooSignal WooCommerce App](https://woosignal.com)