From 3270fac10bf4ef49ec0454cc7436e5f52947b6ee Mon Sep 17 00:00:00 2001 From: WooSignal Date: Wed, 13 May 2020 22:06:56 +0100 Subject: [PATCH] v2.0.4 Added Flexible widget for checkout details --- LabelStoreMax/CHANGELOG.md | 5 + LabelStoreMax/lib/labelconfig.dart | 2 +- LabelStoreMax/lib/pages/checkout_details.dart | 190 +++++++++--------- LabelStoreMax/lib/widgets/buttons.dart | 1 - LabelStoreMax/pubspec.yaml | 2 +- 5 files changed, 106 insertions(+), 94 deletions(-) diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 7216fac..c82afc3 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,8 @@ +## [2.0.4] - 2020-05-13 + +* Added Flexible widget for checkout details +* Bug fixes + ## [2.0.3] - 2020-05-12 * New state options for taxes/shipping diff --git a/LabelStoreMax/lib/labelconfig.dart b/LabelStoreMax/lib/labelconfig.dart index 06eb1f9..ec32f13 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.3 + VERSION - 2.0.4 https://woosignal.com */ diff --git a/LabelStoreMax/lib/pages/checkout_details.dart b/LabelStoreMax/lib/pages/checkout_details.dart index 8787ad1..a2a3be6 100644 --- a/LabelStoreMax/lib/pages/checkout_details.dart +++ b/LabelStoreMax/lib/pages/checkout_details.dart @@ -183,99 +183,107 @@ class _CheckoutDetailsPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "First Name"), - controller: _txtShippingFirstName, - shouldAutoFocus: true, - ), - ), - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Last Name"), - controller: _txtShippingLastName, - ), - ), - ], - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - ), - Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Address Line"), - controller: _txtShippingAddressLine, - ), - ), - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "City"), - controller: _txtShippingCity, - ), - ), - ], - ), - Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Postal code"), - controller: _txtShippingPostalCode, - ), - ), - Flexible( - child: wsTextEditingRow(context, - heading: trans(context, "Email address"), - keyboardType: TextInputType.emailAddress, - controller: _txtShippingEmailAddress), - ), - ], - ), - Row( - children: [ - (_strBillingCountry == "United States" - ? Flexible( - child: Padding( - child: wsSecondaryButton( - context, - title: (_strBillingState != null && - _strBillingState.isNotEmpty - ? trans(context, "Selected") + - "\n" + - _strBillingState - : trans(context, "Select state")), - action: _showSelectStateModal, - ), - padding: EdgeInsets.all(8), - ), - ) - : null), - Flexible( - child: Padding( - child: wsSecondaryButton( + Flexible( + child: Row( + children: [ + Flexible( + child: wsTextEditingRow( context, - title: (_strBillingCountry != null && - _strBillingCountry.isNotEmpty - ? trans(context, "Selected") + - "\n" + - _strBillingCountry - : trans(context, "Select country")), - action: _showSelectCountryModal, + heading: trans(context, "First Name"), + controller: _txtShippingFirstName, + shouldAutoFocus: true, ), - padding: EdgeInsets.all(8), ), - ) - ].where((element) => element != null).toList(), - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "Last Name"), + controller: _txtShippingLastName, + ), + ), + ], + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + ), + ), + Flexible( + child: Row( + children: [ + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "Address Line"), + controller: _txtShippingAddressLine, + ), + ), + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "City"), + controller: _txtShippingCity, + ), + ), + ], + ), + ), + Flexible( + child: Row( + children: [ + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "Postal code"), + controller: _txtShippingPostalCode, + ), + ), + Flexible( + child: wsTextEditingRow(context, + heading: trans(context, "Email address"), + keyboardType: TextInputType.emailAddress, + controller: _txtShippingEmailAddress), + ), + ], + ), + ), + Flexible( + child: Row( + children: [ + (_strBillingCountry == "United States" + ? Flexible( + child: Padding( + child: wsSecondaryButton( + context, + title: (_strBillingState != null && + _strBillingState.isNotEmpty + ? trans(context, "Selected") + + "\n" + + _strBillingState + : trans(context, "Select state")), + action: _showSelectStateModal, + ), + padding: EdgeInsets.all(8), + ), + ) + : null), + Flexible( + child: Padding( + child: wsSecondaryButton( + context, + title: (_strBillingCountry != null && + _strBillingCountry.isNotEmpty + ? trans(context, "Selected") + + "\n" + + _strBillingCountry + : trans(context, "Select country")), + action: _showSelectCountryModal, + ), + padding: EdgeInsets.all(8), + ), + ) + ].where((element) => element != null).toList(), + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + ), ) ], ), @@ -286,7 +294,7 @@ class _CheckoutDetailsPageState extends State { ), padding: EdgeInsets.all(8), ), - height: (constraints.maxHeight - constraints.minHeight) * 0.5, + height: (constraints.maxHeight - constraints.minHeight) * 0.6, ), Column( children: [ diff --git a/LabelStoreMax/lib/widgets/buttons.dart b/LabelStoreMax/lib/widgets/buttons.dart index f0098cd..6521219 100644 --- a/LabelStoreMax/lib/widgets/buttons.dart +++ b/LabelStoreMax/lib/widgets/buttons.dart @@ -37,7 +37,6 @@ Widget wsSecondaryButton(BuildContext context, height: 60, margin: EdgeInsets.only(top: 10), child: RaisedButton( - padding: EdgeInsets.all(10), child: Text( title, style: Theme.of(context).primaryTextTheme.bodyText1.copyWith( diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index c4eb5ea..3d47e52 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,5 +1,5 @@ # Label StoreMax -# Version 2.0.3 +# Version 2.0.4 #authors: - "Anthony Gordon" #documentation: https://woosignal.com/docs/app/ios/label-storemax #homepage: https://woosignal.com/