From 73129ae828893cf282f430a81b9cb66f1992385f Mon Sep 17 00:00:00 2001 From: WooSignal Date: Sun, 29 Mar 2020 17:08:42 +0100 Subject: [PATCH] Changes and tweaks --- LabelStoreMax/lib/helpers/tools.dart | 2 +- LabelStoreMax/lib/pages/browse_category.dart | 1 + LabelStoreMax/lib/pages/browse_search.dart | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/LabelStoreMax/lib/helpers/tools.dart b/LabelStoreMax/lib/helpers/tools.dart index 69d42a6..723787b 100644 --- a/LabelStoreMax/lib/helpers/tools.dart +++ b/LabelStoreMax/lib/helpers/tools.dart @@ -215,7 +215,7 @@ double strCal({@required String sum}) { Future workoutShippingCostWC({@required String sum}) async { List cartLineItem = await Cart.getInstance.getCart(); sum = sum.replaceAllMapped(defaultRegex(r'\[qty\]', strict: true), (replace) { - return cartLineItem.length.toString(); + return cartLineItem.map((f) => f.quantity).toList().reduce((i,d) => i+d).toString(); }); String orderTotal = await Cart.getInstance.getSubtotal(); diff --git a/LabelStoreMax/lib/pages/browse_category.dart b/LabelStoreMax/lib/pages/browse_category.dart index b7f09c5..b6cc741 100644 --- a/LabelStoreMax/lib/pages/browse_category.dart +++ b/LabelStoreMax/lib/pages/browse_category.dart @@ -114,6 +114,7 @@ class _BrowseCategoryPageState extends State { style: Theme.of(context).primaryTextTheme.title) ], ), + centerTitle: true, ), body: SafeArea( minimum: safeAreaDefault(), diff --git a/LabelStoreMax/lib/pages/browse_search.dart b/LabelStoreMax/lib/pages/browse_search.dart index d870ee1..23332d0 100644 --- a/LabelStoreMax/lib/pages/browse_search.dart +++ b/LabelStoreMax/lib/pages/browse_search.dart @@ -99,6 +99,7 @@ class _BrowseSearchState extends State { style: Theme.of(context).primaryTextTheme.title) ], ), + centerTitle: true, ), body: SafeArea( minimum: safeAreaDefault(),