v2.0.4 Added Flexible widget for checkout details

This commit is contained in:
WooSignal 2020-05-13 22:06:56 +01:00
parent 9d57663115
commit 3270fac10b
5 changed files with 106 additions and 94 deletions

View File

@ -1,3 +1,8 @@
## [2.0.4] - 2020-05-13
* Added Flexible widget for checkout details
* Bug fixes
## [2.0.3] - 2020-05-12 ## [2.0.3] - 2020-05-12
* New state options for taxes/shipping * New state options for taxes/shipping

View File

@ -16,7 +16,7 @@ import 'dart:ui';
Developer Notes Developer Notes
SUPPORT EMAIL - support@woosignal.com SUPPORT EMAIL - support@woosignal.com
VERSION - 2.0.3 VERSION - 2.0.4
https://woosignal.com https://woosignal.com
*/ */

View File

@ -183,99 +183,107 @@ class _CheckoutDetailsPageState extends State<CheckoutDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Row( Flexible(
children: <Widget>[ child: Row(
Flexible( children: <Widget>[
child: wsTextEditingRow( Flexible(
context, child: wsTextEditingRow(
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: <Widget>[
Flexible(
child: wsTextEditingRow(
context,
heading: trans(context, "Address Line"),
controller: _txtShippingAddressLine,
),
),
Flexible(
child: wsTextEditingRow(
context,
heading: trans(context, "City"),
controller: _txtShippingCity,
),
),
],
),
Row(
children: <Widget>[
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: <Widget>[
(_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, context,
title: (_strBillingCountry != null && heading: trans(context, "First Name"),
_strBillingCountry.isNotEmpty controller: _txtShippingFirstName,
? trans(context, "Selected") + shouldAutoFocus: true,
"\n" +
_strBillingCountry
: trans(context, "Select country")),
action: _showSelectCountryModal,
), ),
padding: EdgeInsets.all(8),
), ),
) Flexible(
].where((element) => element != null).toList(), child: wsTextEditingRow(
crossAxisAlignment: CrossAxisAlignment.center, context,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, heading: trans(context, "Last Name"),
controller: _txtShippingLastName,
),
),
],
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
),
),
Flexible(
child: Row(
children: <Widget>[
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: <Widget>[
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: <Widget>[
(_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<CheckoutDetailsPage> {
), ),
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
), ),
height: (constraints.maxHeight - constraints.minHeight) * 0.5, height: (constraints.maxHeight - constraints.minHeight) * 0.6,
), ),
Column( Column(
children: <Widget>[ children: <Widget>[

View File

@ -37,7 +37,6 @@ Widget wsSecondaryButton(BuildContext context,
height: 60, height: 60,
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
child: RaisedButton( child: RaisedButton(
padding: EdgeInsets.all(10),
child: Text( child: Text(
title, title,
style: Theme.of(context).primaryTextTheme.bodyText1.copyWith( style: Theme.of(context).primaryTextTheme.bodyText1.copyWith(

View File

@ -1,5 +1,5 @@
# Label StoreMax # Label StoreMax
# Version 2.0.3 # Version 2.0.4
#authors: - "Anthony Gordon" #authors: - "Anthony Gordon"
#documentation: https://woosignal.com/docs/app/ios/label-storemax #documentation: https://woosignal.com/docs/app/ios/label-storemax
#homepage: https://woosignal.com/ #homepage: https://woosignal.com/