diff --git a/LabelStoreMax/.flutter-plugins-dependencies b/LabelStoreMax/.flutter-plugins-dependencies index 68d6261..53b0b37 100644 --- a/LabelStoreMax/.flutter-plugins-dependencies +++ b/LabelStoreMax/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.2+1/","dependencies":[]},{"name":"flutter_money_formatter","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_money_formatter-0.8.3/","dependencies":[]},{"name":"flutter_web_browser","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web_browser-0.11.0/","dependencies":[]},{"name":"package_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16/","dependencies":[]},{"name":"path_provider","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/","dependencies":[]},{"name":"shared_preferences","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.6+5/","dependencies":[]},{"name":"woosignal_stripe","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/woosignal_stripe-0.0.4/","dependencies":[]}],"android":[{"name":"device_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.2+1/","dependencies":[]},{"name":"flutter_money_formatter","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_money_formatter-0.8.3/","dependencies":[]},{"name":"flutter_web_browser","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web_browser-0.11.0/","dependencies":[]},{"name":"package_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16/","dependencies":[]},{"name":"path_provider","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/","dependencies":[]},{"name":"shared_preferences","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.6+5/","dependencies":[]},{"name":"woosignal_stripe","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/woosignal_stripe-0.0.4/","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+6/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+4/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_money_formatter","dependencies":[]},{"name":"flutter_web_browser","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"woosignal_stripe","dependencies":[]}],"date_created":"2020-04-09 03:26:04.771408","version":"1.18.0-5.0.pre.38"} \ No newline at end of file +{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_money_formatter","dependencies":[]},{"name":"flutter_web_browser","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"woosignal_stripe","dependencies":[]}]} \ No newline at end of file diff --git a/LabelStoreMax/lib/helpers/app_themes.dart b/LabelStoreMax/lib/helpers/app_themes.dart index 21f57c7..9f251ca 100644 --- a/LabelStoreMax/lib/helpers/app_themes.dart +++ b/LabelStoreMax/lib/helpers/app_themes.dart @@ -40,7 +40,7 @@ TextTheme textThemeAccent() { color: Colors.black, fontFamily: appFontFamily, fontWeight: FontWeight.w800), - bodyText1: new TextStyle( + body2: new TextStyle( color: HexColor("#606060"), fontFamily: appFontFamily, fontWeight: FontWeight.w700), @@ -89,7 +89,7 @@ TextTheme textThemePrimary() { color: Colors.black, fontFamily: appFontFamily, fontWeight: FontWeight.w800), - bodyText1: new TextStyle( + body2: new TextStyle( color: HexColor("#606060"), fontFamily: appFontFamily, fontWeight: FontWeight.w700), @@ -122,7 +122,7 @@ TextTheme textThemeMain() { headline: new TextStyle(color: Colors.black, fontFamily: appFontFamily), title: new TextStyle(color: Colors.black, fontFamily: appFontFamily), subhead: new TextStyle(color: Colors.black, fontFamily: appFontFamily), - bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily), + body2: new TextStyle(color: Colors.black, fontFamily: appFontFamily), body1: new TextStyle(color: Colors.black, fontFamily: appFontFamily), caption: new TextStyle( color: Colors.redAccent, fontSize: 16, fontFamily: appFontFamily), @@ -142,7 +142,7 @@ TextTheme textThemeAppBar() { fontFamily: appFontFamily, fontWeight: FontWeight.w900), subhead: new TextStyle(color: Colors.black, fontFamily: appFontFamily), - bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily), + body2: new TextStyle(color: Colors.black, fontFamily: appFontFamily), body1: new TextStyle(color: Colors.black, fontFamily: appFontFamily), caption: new TextStyle(color: Colors.black, fontFamily: appFontFamily), button: new TextStyle(color: Colors.black, fontFamily: appFontFamily), diff --git a/LabelStoreMax/lib/helpers/lifecycle_event_handler.dart b/LabelStoreMax/lib/helpers/lifecycle_event_handler.dart index e072084..7440893 100644 --- a/LabelStoreMax/lib/helpers/lifecycle_event_handler.dart +++ b/LabelStoreMax/lib/helpers/lifecycle_event_handler.dart @@ -37,4 +37,4 @@ class LifecycleEventHandler extends WidgetsBindingObserver { break; } } -} \ No newline at end of file +} diff --git a/LabelStoreMax/lib/helpers/tools.dart b/LabelStoreMax/lib/helpers/tools.dart index 4afffb8..30aedf1 100644 --- a/LabelStoreMax/lib/helpers/tools.dart +++ b/LabelStoreMax/lib/helpers/tools.dart @@ -198,7 +198,11 @@ 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.map((f) => f.quantity).toList().reduce((i,d) => i+d).toString(); + return cartLineItem + .map((f) => f.quantity) + .toList() + .reduce((i, d) => i + d) + .toString(); }); String orderTotal = await Cart.getInstance.getSubtotal(); @@ -264,7 +268,11 @@ Future workoutShippingCostWC({@required String sum}) async { Future workoutShippingClassCostWC( {@required String sum, List cartLineItem}) async { sum = sum.replaceAllMapped(defaultRegex(r'\[qty\]', strict: true), (replace) { - return cartLineItem.map((f) => f.quantity).toList().reduce((i,d) => i+d).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/labelconfig.dart b/LabelStoreMax/lib/labelconfig.dart index 655f31c..94f645d 100644 --- a/LabelStoreMax/lib/labelconfig.dart +++ b/LabelStoreMax/lib/labelconfig.dart @@ -23,6 +23,8 @@ const app_name = "MyApp"; const app_key = "Your App Key"; +// Your App key from WooSignal +// link: https://woosignal.com/dashboard/apps const app_logo_url = "https://woosignal.com/images/120x120_woosignal.png"; @@ -31,9 +33,15 @@ const app_privacy_url = "https://yourdomain.com/privacy"; /**/ -const app_stripe_account = "Your Stripe Account"; // Your StripeAccount key from WooSignal +const app_stripe_account = "Your Stripe Key"; +// Your StripeAccount key from WooSignal +// link: https://woosignal.com/dashboard -const app_stripe_live_mode = false; // SET true for live payments +const app_stripe_live_mode = false; +// For Live Payments follow the below steps +// #1 SET the above to true for live payments +// #2 Next visit https://woosignal.com/dashboard +// #3 Then change "Environment for Stripe" to Live mode /**/ diff --git a/LabelStoreMax/lib/pages/about.dart b/LabelStoreMax/lib/pages/about.dart index 44c9217..b184119 100644 --- a/LabelStoreMax/lib/pages/about.dart +++ b/LabelStoreMax/lib/pages/about.dart @@ -42,7 +42,7 @@ class _AboutPageState extends State { }, ), title: Text(trans(context, "About"), - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), centerTitle: true, ), body: SafeArea( @@ -86,7 +86,7 @@ class _AboutPageState extends State { ": " + snapshot.data.version, style: - Theme.of(context).primaryTextTheme.bodyText1), + Theme.of(context).primaryTextTheme.body2), padding: EdgeInsets.only(top: 15, bottom: 15), ); } diff --git a/LabelStoreMax/lib/pages/browse_category.dart b/LabelStoreMax/lib/pages/browse_category.dart index a67a9d8..b6cc741 100644 --- a/LabelStoreMax/lib/pages/browse_category.dart +++ b/LabelStoreMax/lib/pages/browse_category.dart @@ -109,7 +109,7 @@ class _BrowseCategoryPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text(trans(context, "Browse"), - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), Text(_selectedCategory.name, style: Theme.of(context).primaryTextTheme.title) ], diff --git a/LabelStoreMax/lib/pages/browse_search.dart b/LabelStoreMax/lib/pages/browse_search.dart index ab55bb2..23332d0 100644 --- a/LabelStoreMax/lib/pages/browse_search.dart +++ b/LabelStoreMax/lib/pages/browse_search.dart @@ -94,7 +94,7 @@ class _BrowseSearchState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text(trans(context, "Search results for"), - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), Text("\"" + _search + "\"", style: Theme.of(context).primaryTextTheme.title) ], diff --git a/LabelStoreMax/lib/pages/cart.dart b/LabelStoreMax/lib/pages/cart.dart index 3ed0960..32971e3 100644 --- a/LabelStoreMax/lib/pages/cart.dart +++ b/LabelStoreMax/lib/pages/cart.dart @@ -161,7 +161,7 @@ class _CartPageState extends State { child: Align( child: Padding( child: Text(trans(context, "Clear Cart"), - style: Theme.of(context).primaryTextTheme.bodyText1), + style: Theme.of(context).primaryTextTheme.body2), padding: EdgeInsets.only(right: 8), ), alignment: Alignment.centerLeft, @@ -190,7 +190,7 @@ class _CartPageState extends State { alignment: Alignment.center), Padding( child: Text(trans(context, "Empty Basket"), - style: Theme.of(context).primaryTextTheme.bodyText2), + style: Theme.of(context).primaryTextTheme.body1), padding: EdgeInsets.only(top: 10), ) ], diff --git a/LabelStoreMax/lib/pages/checkout_confirmation.dart b/LabelStoreMax/lib/pages/checkout_confirmation.dart index c90e1f7..9e07503 100644 --- a/LabelStoreMax/lib/pages/checkout_confirmation.dart +++ b/LabelStoreMax/lib/pages/checkout_confirmation.dart @@ -131,7 +131,7 @@ class CheckoutConfirmationPageState extends State { children: [ Center( child: Text(trans(context, "Checkout"), - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), ), Expanded( child: Container( @@ -251,7 +251,7 @@ class CheckoutConfirmationPageState extends State { padding: const EdgeInsets.only(top: 15), child: Text( trans(context, "One moment") + "...", - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, ), ) ], diff --git a/LabelStoreMax/lib/pages/checkout_details.dart b/LabelStoreMax/lib/pages/checkout_details.dart index b11ddcb..e356e5f 100644 --- a/LabelStoreMax/lib/pages/checkout_details.dart +++ b/LabelStoreMax/lib/pages/checkout_details.dart @@ -94,7 +94,7 @@ class _CheckoutDetailsPageState extends State { return InkWell( child: Container( child: Text(strName["name"], - style: Theme.of(context).primaryTextTheme.bodyText1), + style: Theme.of(context).primaryTextTheme.body2), padding: EdgeInsets.only(top: 25, bottom: 25), ), splashColor: Colors.grey, @@ -123,8 +123,11 @@ class _CheckoutDetailsPageState extends State { resizeToAvoidBottomPadding: false, appBar: AppBar( backgroundColor: Colors.transparent, - title: Text(trans(context, "Billing & Shipping Details"), - style: Theme.of(context).primaryTextTheme.subtitle1), + title: Text( + trans(context, "Billing & Shipping Details"), + style: Theme.of(context).primaryTextTheme.subhead, + ), + centerTitle: true, ), body: SafeArea( minimum: safeAreaDefault(), @@ -146,33 +149,43 @@ class _CheckoutDetailsPageState extends State { Row( children: [ Flexible( - child: wsTextEditingRow(context, - heading: trans(context, "First Name"), - controller: _txtBillingFirstName, - shouldAutoFocus: true), + child: wsTextEditingRow( + context, + heading: trans(context, "First Name"), + controller: _txtBillingFirstName, + shouldAutoFocus: true, + ), ), Flexible( - child: wsTextEditingRow(context, - heading: trans(context, "Last Name"), - controller: _txtBillingLastName), + child: wsTextEditingRow( + context, + heading: trans(context, "Last Name"), + controller: _txtBillingLastName, + ), ), ], crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceEvenly, ), - wsTextEditingRow(context, - heading: trans(context, "Address Line"), - controller: _txtBillingAddressLine), + wsTextEditingRow( + context, + heading: trans(context, "Address Line"), + controller: _txtBillingAddressLine, + ), Row(children: [ Flexible( - child: wsTextEditingRow(context, - heading: trans(context, "City"), - controller: _txtBillingCity), + child: wsTextEditingRow( + context, + heading: trans(context, "City"), + controller: _txtBillingCity, + ), ), Flexible( - child: wsTextEditingRow(context, - heading: trans(context, "Postal code"), - controller: _txtBillingPostalCode), + child: wsTextEditingRow( + context, + heading: trans(context, "Postal code"), + controller: _txtBillingPostalCode, + ), ), ]), Row( @@ -228,7 +241,7 @@ class _CheckoutDetailsPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Text(trans(context, "Remember my details"), - style: Theme.of(context).primaryTextTheme.bodyText1), + style: Theme.of(context).primaryTextTheme.body2), Checkbox( value: valRememberDetails, onChanged: (bool value) { @@ -266,6 +279,7 @@ class _CheckoutDetailsPageState extends State { CheckoutSession.getInstance.clearBillingAddress(); } + CheckoutSession.getInstance.shippingType = null; Navigator.pop(context); }), ], diff --git a/LabelStoreMax/lib/pages/checkout_payment_type.dart b/LabelStoreMax/lib/pages/checkout_payment_type.dart index 980aa9a..7553c6d 100644 --- a/LabelStoreMax/lib/pages/checkout_payment_type.dart +++ b/LabelStoreMax/lib/pages/checkout_payment_type.dart @@ -43,7 +43,7 @@ class _CheckoutPaymentTypePageState extends State { appBar: AppBar( backgroundColor: Colors.transparent, title: Text(trans(context, "Payment Method"), - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), automaticallyImplyLeading: false, centerTitle: true, ), diff --git a/LabelStoreMax/lib/pages/checkout_shipping_type.dart b/LabelStoreMax/lib/pages/checkout_shipping_type.dart index d545740..6119db1 100644 --- a/LabelStoreMax/lib/pages/checkout_shipping_type.dart +++ b/LabelStoreMax/lib/pages/checkout_shipping_type.dart @@ -178,8 +178,13 @@ class _CheckoutShippingTypePageState extends State { resizeToAvoidBottomPadding: false, appBar: AppBar( backgroundColor: Colors.transparent, - title: Text(trans(context, "Shipping Methods"), - style: Theme.of(context).primaryTextTheme.subtitle1), + title: Text( + trans( + context, + "Shipping Methods", + ), + style: Theme.of(context).primaryTextTheme.subhead, + ), automaticallyImplyLeading: false, centerTitle: true, ), diff --git a/LabelStoreMax/lib/pages/checkout_status.dart b/LabelStoreMax/lib/pages/checkout_status.dart index 5dcfa64..1a03c39 100644 --- a/LabelStoreMax/lib/pages/checkout_status.dart +++ b/LabelStoreMax/lib/pages/checkout_status.dart @@ -60,7 +60,7 @@ class _CheckoutStatusState extends State { Padding( child: Text( trans(context, "Order Status"), - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, ), padding: EdgeInsets.only(bottom: 15), ), @@ -71,14 +71,14 @@ class _CheckoutStatusState extends State { ), Text( trans(context, "Your transaction details"), - style: Theme.of(context).primaryTextTheme.bodyText2, + style: Theme.of(context).primaryTextTheme.body1, textAlign: TextAlign.left, ), Text( trans(context, "Order Ref") + ". #" + _order.id.toString(), - style: Theme.of(context).primaryTextTheme.bodyText1, + style: Theme.of(context).primaryTextTheme.body2, textAlign: TextAlign.left, ), ], @@ -104,7 +104,7 @@ class _CheckoutStatusState extends State { child: Padding( child: Text( trans(context, "Items"), - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, textAlign: TextAlign.left, ), padding: EdgeInsets.all(8), @@ -130,21 +130,21 @@ class _CheckoutStatusState extends State { Text(lineItem.name, style: Theme.of(context) .primaryTextTheme - .bodyText1, + .body2, softWrap: false, maxLines: 2, overflow: TextOverflow.ellipsis), Text("x" + lineItem.quantity.toString(), style: Theme.of(context) .primaryTextTheme - .bodyText2), + .body1), ], ), ), Text( formatStringCurrency( total: lineItem.total.toString()), - style: Theme.of(context).primaryTextTheme.bodyText1) + style: Theme.of(context).primaryTextTheme.body2) ], ), decoration: BoxDecoration(color: Colors.white), diff --git a/LabelStoreMax/lib/pages/error_page.dart b/LabelStoreMax/lib/pages/error_page.dart index 5c0a9aa..2367f1c 100644 --- a/LabelStoreMax/lib/pages/error_page.dart +++ b/LabelStoreMax/lib/pages/error_page.dart @@ -46,7 +46,7 @@ class _ErrorPageState extends State { padding: const EdgeInsets.all(16.0), child: Text( trans(context, "Sorry, something went wrong"), - style: Theme.of(context).primaryTextTheme.bodyText2, + style: Theme.of(context).primaryTextTheme.body1, textAlign: TextAlign.center, ), ), diff --git a/LabelStoreMax/lib/pages/home.dart b/LabelStoreMax/lib/pages/home.dart index a9849ad..4205fb2 100644 --- a/LabelStoreMax/lib/pages/home.dart +++ b/LabelStoreMax/lib/pages/home.dart @@ -114,13 +114,14 @@ class _HomePageState extends State { decoration: new BoxDecoration( color: Colors.white, borderRadius: new BorderRadius.only( - topLeft: const Radius.circular(10.0), - topRight: const Radius.circular(10.0),), + topLeft: const Radius.circular(10.0), + topRight: const Radius.circular(10.0), + ), ), child: Column( children: [ Text(trans(context, "Categories"), - style: Theme.of(context).primaryTextTheme.headline4, + style: Theme.of(context).primaryTextTheme.display1, textAlign: TextAlign.left), Expanded( child: new ListView.builder( @@ -197,10 +198,10 @@ class _HomePageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text(trans(context, "Shop") + " / ", - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), Text( trans(context, "Newest"), - style: Theme.of(context).primaryTextTheme.bodyText2, + style: Theme.of(context).primaryTextTheme.body1, ) ], ), @@ -209,7 +210,7 @@ class _HomePageState extends State { height: 60, child: Text( trans(context, "Browse categories"), - style: Theme.of(context).primaryTextTheme.bodyText1, + style: Theme.of(context).primaryTextTheme.body2, ), onPressed: () { _modalBottomSheetMenu(); diff --git a/LabelStoreMax/lib/pages/home_menu.dart b/LabelStoreMax/lib/pages/home_menu.dart index 122461a..f853207 100644 --- a/LabelStoreMax/lib/pages/home_menu.dart +++ b/LabelStoreMax/lib/pages/home_menu.dart @@ -36,7 +36,7 @@ class _HomeMenuPageState extends State { backgroundColor: Colors.transparent, elevation: 0.0, title: Text(trans(context, "Menu"), - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), leading: IconButton( icon: Icon(Icons.close), onPressed: () { diff --git a/LabelStoreMax/lib/pages/product_detail.dart b/LabelStoreMax/lib/pages/product_detail.dart index b618266..ba94d3c 100644 --- a/LabelStoreMax/lib/pages/product_detail.dart +++ b/LabelStoreMax/lib/pages/product_detail.dart @@ -84,38 +84,40 @@ class _ProductDetailState extends State { } void _modalBottomSheetOptionsForAttribute(int attributeIndex) { - wsModalBottom(context, - title: trans(context, "Select a") + - " " + - _product.attributes[attributeIndex].name, - bodyWidget: Expanded( - child: ListView.separated( - itemCount: _product.attributes[attributeIndex].options.length, - separatorBuilder: (BuildContext context, int index) => Divider(), - itemBuilder: (BuildContext context, int index) { - return ListTile( - title: Text(_product.attributes[attributeIndex].options[index], - style: Theme.of(context).primaryTextTheme.subtitle1), - trailing: (_tmpAttributeObj.isNotEmpty && - _tmpAttributeObj.containsKey(attributeIndex) && - _tmpAttributeObj[attributeIndex]["value"] == - _product.attributes[attributeIndex].options[index]) - ? Icon(Icons.check, color: Colors.blueAccent) - : null, - onTap: () { - _tmpAttributeObj[attributeIndex] = { - "name": _product.attributes[attributeIndex].name, - "value": _product.attributes[attributeIndex].options[index] - }; - Navigator.pop(context, () {}); - Navigator.pop(context); - _modalBottomSheetAttributes(); - }, - ); - }, - ), - flex: 1, - ),); + wsModalBottom( + context, + title: trans(context, "Select a") + + " " + + _product.attributes[attributeIndex].name, + bodyWidget: Expanded( + child: ListView.separated( + itemCount: _product.attributes[attributeIndex].options.length, + separatorBuilder: (BuildContext context, int index) => Divider(), + itemBuilder: (BuildContext context, int index) { + return ListTile( + title: Text(_product.attributes[attributeIndex].options[index], + style: Theme.of(context).primaryTextTheme.subhead), + trailing: (_tmpAttributeObj.isNotEmpty && + _tmpAttributeObj.containsKey(attributeIndex) && + _tmpAttributeObj[attributeIndex]["value"] == + _product.attributes[attributeIndex].options[index]) + ? Icon(Icons.check, color: Colors.blueAccent) + : null, + onTap: () { + _tmpAttributeObj[attributeIndex] = { + "name": _product.attributes[attributeIndex].name, + "value": _product.attributes[attributeIndex].options[index] + }; + Navigator.pop(context, () {}); + Navigator.pop(context); + _modalBottomSheetAttributes(); + }, + ); + }, + ), + flex: 1, + ), + ); } _itemAddToCart({CartLineItem cartLineItem}) { @@ -142,11 +144,11 @@ class _ProductDetailState extends State { itemBuilder: (BuildContext context, int index) { return ListTile( title: Text(_product.attributes[index].name, - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), subtitle: (_tmpAttributeObj.isNotEmpty && _tmpAttributeObj.containsKey(index)) ? Text(_tmpAttributeObj[index]["value"], - style: Theme.of(context).primaryTextTheme.bodyText1) + style: Theme.of(context).primaryTextTheme.body2) : Text(trans(context, "Select a") + " " + _product.attributes[index].name), @@ -177,14 +179,14 @@ class _ProductDetailState extends State { findProductVariation() == null) ? trans(context, "This variation is unavailable") : trans(context, "Choose your options"))), - style: Theme.of(context).primaryTextTheme.subtitle1), + style: Theme.of(context).primaryTextTheme.subhead), Text( (findProductVariation() != null ? findProductVariation().stockStatus != "instock" ? trans(context, "Out of stock") : "" : ""), - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, ), wsPrimaryButton(context, title: trans(context, "Add to cart"), action: () { @@ -321,7 +323,7 @@ class _ProductDetailState extends State { child: Text( _product.name, style: - Theme.of(context).primaryTextTheme.bodyText1, + Theme.of(context).primaryTextTheme.body2, textAlign: TextAlign.left, overflow: TextOverflow.ellipsis, maxLines: 2, @@ -338,7 +340,7 @@ class _ProductDetailState extends State { total: _product.price), style: Theme.of(context) .primaryTextTheme - .headline2 + .display1 .copyWith( fontSize: 20, ), @@ -378,7 +380,7 @@ class _ProductDetailState extends State { trans(context, "Full description"), style: Theme.of(context) .primaryTextTheme - .bodyText2 + .body1 .copyWith(fontSize: 14), textAlign: TextAlign.right, ), @@ -432,7 +434,7 @@ class _ProductDetailState extends State { children: [ Text( "Quantity", - style: Theme.of(context).primaryTextTheme.bodyText1, + style: Theme.of(context).primaryTextTheme.body2, ), Row( children: [ @@ -452,7 +454,7 @@ class _ProductDetailState extends State { Text( _quantityIndicator.toString(), style: - Theme.of(context).primaryTextTheme.bodyText1, + Theme.of(context).primaryTextTheme.body2, ), IconButton( icon: Icon( @@ -483,7 +485,7 @@ class _ProductDetailState extends State { _quantityIndicator) .toString()), style: - Theme.of(context).primaryTextTheme.headline2, + Theme.of(context).primaryTextTheme.display1, textAlign: TextAlign.center, ), alignment: Alignment.centerLeft, diff --git a/LabelStoreMax/lib/providers/stripe_pay.dart b/LabelStoreMax/lib/providers/stripe_pay.dart index 828f704..4f5ef39 100644 --- a/LabelStoreMax/lib/providers/stripe_pay.dart +++ b/LabelStoreMax/lib/providers/stripe_pay.dart @@ -56,7 +56,11 @@ stripePay(context, }); if (rsp == null) { - showEdgeAlertWith(context,title: "Oops!", desc: "Something went wrong, please try again.", icon: Icons.payment, style: EdgeAlertStyle.WARNING); + showEdgeAlertWith(context, + title: "Oops!", + desc: "Something went wrong, please try again.", + icon: Icons.payment, + style: EdgeAlertStyle.WARNING); state.reloadState(showLoader: false); return; } @@ -101,4 +105,4 @@ stripePay(context, } }); } -} \ No newline at end of file +} diff --git a/LabelStoreMax/lib/widgets/buttons.dart b/LabelStoreMax/lib/widgets/buttons.dart index 47ca123..3cb88dc 100644 --- a/LabelStoreMax/lib/widgets/buttons.dart +++ b/LabelStoreMax/lib/widgets/buttons.dart @@ -28,7 +28,7 @@ Widget wsSecondaryButton(BuildContext context, child: RaisedButton( padding: EdgeInsets.all(10), child: Text(title, - style: Theme.of(context).primaryTextTheme.bodyText1, + style: Theme.of(context).primaryTextTheme.body2, textAlign: TextAlign.center), onPressed: action, color: HexColor("#f6f6f9"), @@ -44,7 +44,7 @@ Widget wsLinkButton(BuildContext context, child: MaterialButton( padding: EdgeInsets.all(10), child: Text(title, - style: Theme.of(context).primaryTextTheme.bodyText1, + style: Theme.of(context).primaryTextTheme.body2, textAlign: TextAlign.left), onPressed: action, elevation: 0), diff --git a/LabelStoreMax/lib/widgets/cart_icon.dart b/LabelStoreMax/lib/widgets/cart_icon.dart index e5212a6..6030f3e 100644 --- a/LabelStoreMax/lib/widgets/cart_icon.dart +++ b/LabelStoreMax/lib/widgets/cart_icon.dart @@ -27,7 +27,7 @@ Widget wsCartIcon(BuildContext context) { else return new Text( snapshot.data.length.toString(), - style: Theme.of(context).primaryTextTheme.bodyText1, + style: Theme.of(context).primaryTextTheme.body2, textAlign: TextAlign.center, ); } diff --git a/LabelStoreMax/lib/widgets/menu_item.dart b/LabelStoreMax/lib/widgets/menu_item.dart index 464fe88..3b13523 100644 --- a/LabelStoreMax/lib/widgets/menu_item.dart +++ b/LabelStoreMax/lib/widgets/menu_item.dart @@ -14,7 +14,7 @@ Widget wsMenuItem(BuildContext context, children: [ leading, Text(" " + title, - style: Theme.of(context).primaryTextTheme.bodyText2), + style: Theme.of(context).primaryTextTheme.body1), ], ), ), diff --git a/LabelStoreMax/lib/widgets/woosignal_ui.dart b/LabelStoreMax/lib/widgets/woosignal_ui.dart index a0f6a45..49a5aa6 100644 --- a/LabelStoreMax/lib/widgets/woosignal_ui.dart +++ b/LabelStoreMax/lib/widgets/woosignal_ui.dart @@ -37,7 +37,7 @@ Widget wsRow2Text(BuildContext context, {String text1, String text2}) { child: Text(text2, style: Theme.of(context) .primaryTextTheme - .bodyText1 + .body2 .copyWith(fontSize: 16, color: Colors.black87)), ), flex: 3, @@ -50,7 +50,7 @@ Widget wsNoResults(BuildContext context) { return Column( children: [ Text(trans(context, "No results"), - style: Theme.of(context).primaryTextTheme.bodyText2), + style: Theme.of(context).primaryTextTheme.body1), ], ); } @@ -70,7 +70,7 @@ Widget wsCheckoutRow(BuildContext context, children: [ Padding( child: Text(heading, - style: Theme.of(context).primaryTextTheme.bodyText2), + style: Theme.of(context).primaryTextTheme.body1), padding: EdgeInsets.only(bottom: 8), ), Row( @@ -84,7 +84,7 @@ Widget wsCheckoutRow(BuildContext context, leadImage, Container( child: Text(leadTitle, - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, maxLines: 2, overflow: TextOverflow.ellipsis, softWrap: false), @@ -122,12 +122,12 @@ Widget wsTextEditingRow(BuildContext context, mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - child: Text(heading, style: Theme.of(context).primaryTextTheme.bodyText1), + child: Text(heading, style: Theme.of(context).primaryTextTheme.body2), padding: EdgeInsets.only(bottom: 2), ), TextField( controller: controller, - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, keyboardType: keyboardType ?? TextInputType.text, autocorrect: false, autofocus: shouldAutoFocus ?? false, @@ -146,13 +146,13 @@ Widget widgetCheckoutMeta(BuildContext context, {String title, String amount}) { children: [ Flexible( child: Container( - child: Text(title, style: Theme.of(context).primaryTextTheme.bodyText2), + child: Text(title, style: Theme.of(context).primaryTextTheme.body1), ), flex: 3, ), Flexible( child: Container( - child: Text(amount, style: Theme.of(context).primaryTextTheme.bodyText1), + child: Text(amount, style: Theme.of(context).primaryTextTheme.body2), ), flex: 3, ) @@ -180,7 +180,9 @@ Widget wsCardProductItem(BuildContext context, {int index, Product product}) { padding: EdgeInsets.all(10), margin: EdgeInsets.all(5), decoration: BoxDecoration( - color: Colors.white, borderRadius: BorderRadius.circular(5),), + color: Colors.white, + borderRadius: BorderRadius.circular(5), + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ @@ -198,7 +200,7 @@ Widget wsCardProductItem(BuildContext context, {int index, Product product}) { Flexible( child: Text( formatStringCurrency(total: product.price), - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.body2, textAlign: TextAlign.left, ), flex: 1, @@ -206,7 +208,7 @@ Widget wsCardProductItem(BuildContext context, {int index, Product product}) { Expanded( child: Text( product.name, - style: Theme.of(context).textTheme.bodyText2, + style: Theme.of(context).textTheme.body1, overflow: TextOverflow.clip, maxLines: 1, ), @@ -244,7 +246,7 @@ void wsModalBottom(BuildContext context, Text(title, style: Theme.of(context) .primaryTextTheme - .headline2 + .display1 .copyWith(fontSize: 20), textAlign: TextAlign.left), bodyWidget, @@ -414,13 +416,13 @@ Widget wsCardCartItem(BuildContext context, children: [ Text( cartLineItem.name, - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, overflow: TextOverflow.ellipsis, maxLines: 3, ), (cartLineItem.variationOptions != null ? Text(cartLineItem.variationOptions, - style: Theme.of(context).primaryTextTheme.bodyText1) + style: Theme.of(context).primaryTextTheme.body2) : Container()), Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -432,11 +434,11 @@ Widget wsCardCartItem(BuildContext context, : trans(context, "In Stock")), style: (cartLineItem.stockStatus == "outofstock" ? Theme.of(context).textTheme.caption - : Theme.of(context).primaryTextTheme.bodyText2)), + : Theme.of(context).primaryTextTheme.body1)), Text( formatDoubleCurrency( total: double.parse(cartLineItem.total)), - style: Theme.of(context).primaryTextTheme.subtitle1, + style: Theme.of(context).primaryTextTheme.subhead, textAlign: TextAlign.center) ], ), diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index 1fad903..97cb2e1 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -7,28 +7,28 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "2.0.11" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.6.0" + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.1" + version: "2.4.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "1.0.5" cached_network_image: dependency: "direct main" description: @@ -42,14 +42,14 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.1.2" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.12" + version: "1.14.11" convert: dependency: transitive description: @@ -63,7 +63,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.3" csslib: dependency: transitive description: @@ -209,7 +209,7 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "2.1.12" + version: "2.1.4" intl: dependency: "direct main" description: @@ -279,7 +279,7 @@ packages: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "2.4.0" platform: dependency: transitive description: @@ -293,7 +293,7 @@ packages: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "2.0.5" shared_preferences: dependency: "direct main" description: @@ -333,7 +333,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.5.5" sqflite: dependency: transitive description: @@ -389,7 +389,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.2.11" transformer_page_view: dependency: transitive description: @@ -438,7 +438,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "3.7.0" + version: "3.5.0" yaml: dependency: transitive description: @@ -447,5 +447,5 @@ packages: source: hosted version: "2.2.0" sdks: - dart: ">=2.7.0 <3.0.0" + dart: ">=2.5.0 <3.0.0" flutter: ">=1.12.13+hotfix.5 <2.0.0"