Changes and tweaks

This commit is contained in:
WooSignal 2020-03-29 17:08:42 +01:00
parent 94996beb72
commit 73129ae828
3 changed files with 3 additions and 1 deletions

View File

@ -215,7 +215,7 @@ double strCal({@required String sum}) {
Future<double> workoutShippingCostWC({@required String sum}) async {
List<CartLineItem> 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();

View File

@ -114,6 +114,7 @@ class _BrowseCategoryPageState extends State<BrowseCategoryPage> {
style: Theme.of(context).primaryTextTheme.title)
],
),
centerTitle: true,
),
body: SafeArea(
minimum: safeAreaDefault(),

View File

@ -99,6 +99,7 @@ class _BrowseSearchState extends State<BrowseSearchPage> {
style: Theme.of(context).primaryTextTheme.title)
],
),
centerTitle: true,
),
body: SafeArea(
minimum: safeAreaDefault(),