phase3: bulk null-safety fixes
- validator: (String value) -> (String? value) [30 files] - ElevatedButton.styleFrom(primary:) -> backgroundColor: [31 files] - global Key? param fix [129 files]
This commit is contained in:
@@ -283,7 +283,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).domains_separated_comma;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class DesktopChangeMobileOrEmailState extends State<DesktopChangeMobileOrEmail>
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
if (widget.isMobile) {
|
||||
return S
|
||||
@@ -184,7 +184,7 @@ class DesktopChangeMobileOrEmailState extends State<DesktopChangeMobileOrEmail>
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).verification_code_is_required;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ class DesktopChangeMobileOrEmailState extends State<DesktopChangeMobileOrEmail>
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit_to_change,
|
||||
|
||||
@@ -137,7 +137,7 @@ class DesktopChangePasswordState extends State<DesktopChangePassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).current_password_is_required;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ class DesktopChangePasswordState extends State<DesktopChangePassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ class DesktopChangePasswordState extends State<DesktopChangePassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -282,7 +282,7 @@ class DesktopChangePasswordState extends State<DesktopChangePassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit,
|
||||
|
||||
@@ -127,7 +127,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).ok,
|
||||
@@ -1652,7 +1652,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
),
|
||||
labelText: S.of(context).enter_coupon_code,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
return null;
|
||||
},
|
||||
),
|
||||
|
||||
@@ -271,7 +271,7 @@ class DesktopCouponsState extends State<DesktopCoupons> {
|
||||
Container(
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
|
||||
@@ -105,7 +105,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
|
||||
.of(context)
|
||||
.contact_name,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -160,7 +160,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
|
||||
.of(context)
|
||||
.mobile_phone_number,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -192,7 +192,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
|
||||
.of(context)
|
||||
.street_line_1,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -246,7 +246,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
|
||||
.of(context)
|
||||
.city,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -316,7 +316,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
|
||||
.of(context)
|
||||
.postal_code,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -361,7 +361,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
|
||||
.of(context)
|
||||
.email,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.isNotEmpty && !EmailValidator.validate(value)) {
|
||||
return S
|
||||
.of(context)
|
||||
|
||||
@@ -83,7 +83,7 @@ class DesktopForgotPasswordState extends State<DesktopForgotPassword> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).mobile_or_email_is_required;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ class DesktopForgotPasswordState extends State<DesktopForgotPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).verification_code_is_required;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ class DesktopForgotPasswordState extends State<DesktopForgotPassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).verify,
|
||||
|
||||
@@ -149,7 +149,7 @@ class DesktopLoginState extends State<DesktopLogin> {
|
||||
),
|
||||
style: TextStyle(fontSize: 18.0),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).this_field_is_required;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ class DesktopLoginState extends State<DesktopLogin> {
|
||||
),
|
||||
style: TextStyle(fontSize: 18.0),
|
||||
obscureText: passwordVisible,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -248,7 +248,7 @@ class DesktopLoginState extends State<DesktopLogin> {
|
||||
top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).login,
|
||||
|
||||
@@ -97,7 +97,7 @@ class DesktopNewAddressState extends State<DesktopNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).contact_name,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).contact_name_is_required;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ class DesktopNewAddressState extends State<DesktopNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).mobile_phone_number,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).mobile_phone_number_is_required;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ class DesktopNewAddressState extends State<DesktopNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).street_line_1,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).street_line_1_is_required;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ class DesktopNewAddressState extends State<DesktopNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).city,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).city_is_required;
|
||||
}
|
||||
@@ -256,7 +256,7 @@ class DesktopNewAddressState extends State<DesktopNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).postal_code,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).postal_code_is_required;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ class DesktopNewAddressState extends State<DesktopNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).email,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.isNotEmpty && !EmailValidator.validate(value)) {
|
||||
return S.of(context).email_is_not_valid;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
_submit();
|
||||
@@ -246,7 +246,7 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
|
||||
@@ -154,7 +154,7 @@ class DesktopNewTicketState extends State<DesktopNewTicket> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).this_field_is_required;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ class DesktopNewTicketState extends State<DesktopNewTicket> {
|
||||
padding: EdgeInsets.only(top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).login,
|
||||
@@ -400,7 +400,7 @@ class DesktopNewTicketState extends State<DesktopNewTicket> {
|
||||
ElevatedButton(
|
||||
child: Text(S.of(context).yes_i_am_sure),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -80,7 +80,7 @@ class DesktopNewUserState extends State<DesktopNewUser> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).mobile_or_email_is_required;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ class DesktopNewUserState extends State<DesktopNewUser> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).verification_code_is_required;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ class DesktopNewUserState extends State<DesktopNewUser> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).register,
|
||||
|
||||
@@ -1177,7 +1177,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
|
||||
S.of(context).no,
|
||||
),
|
||||
style: TextButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -263,7 +263,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Colors.redAccent,
|
||||
backgroundColor: Colors.redAccent,
|
||||
),
|
||||
onPressed: () {
|
||||
Routes.router.navigateTo(context, '/paynow/${order.id}');
|
||||
@@ -278,7 +278,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo);
|
||||
@@ -295,7 +295,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo);
|
||||
|
||||
@@ -133,7 +133,7 @@ class DesktopRenewLicenseState extends State<DesktopRenewLicense> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).please_enter_group_number;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class DesktopResetPasswordState extends State<DesktopResetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ class DesktopResetPasswordState extends State<DesktopResetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ class DesktopResetPasswordState extends State<DesktopResetPassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit,
|
||||
|
||||
@@ -92,7 +92,7 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit,
|
||||
|
||||
@@ -424,7 +424,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).nickname_is_required;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: false,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).this_field_is_required;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
|
||||
padding: EdgeInsets.only(top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).reply,
|
||||
@@ -644,7 +644,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
|
||||
ElevatedButton(
|
||||
child: Text(S.of(context).yes_i_am_sure),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -125,7 +125,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
badgeColor: Colors.lightBlueAccent,
|
||||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Colors.redAccent,
|
||||
backgroundColor: Colors.redAccent,
|
||||
onPrimary: Colors.white,
|
||||
padding: EdgeInsets.only(left: 32, right: 32, top: 20, bottom: 20),
|
||||
elevation: 2.0,
|
||||
@@ -154,7 +154,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
} else {
|
||||
return ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Colors.redAccent,
|
||||
backgroundColor: Colors.redAccent,
|
||||
padding: EdgeInsets.only(left: 32, right: 32, top: 20, bottom: 20),
|
||||
elevation: 2.0,
|
||||
shape: new RoundedRectangleBorder(
|
||||
|
||||
@@ -244,7 +244,7 @@ class DownloadItemState extends State<DownloadItem> {
|
||||
} else if (downloadUrl != null && downloadUrl.isNotEmpty) {
|
||||
return ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
padding: EdgeInsets.all(8)
|
||||
),
|
||||
child: Row(
|
||||
|
||||
@@ -230,7 +230,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).domains_separated_comma;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class MobileChangeMobileOrEmailState extends State<MobileChangeMobileOrEmail> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
if (widget.isMobile) {
|
||||
return S
|
||||
@@ -190,7 +190,7 @@ class MobileChangeMobileOrEmailState extends State<MobileChangeMobileOrEmail> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).verification_code_is_required;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ class MobileChangeMobileOrEmailState extends State<MobileChangeMobileOrEmail> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit_to_change,
|
||||
|
||||
@@ -87,7 +87,7 @@ class MobileChangePasswordState extends State<MobileChangePassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).current_password_is_required;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ class MobileChangePasswordState extends State<MobileChangePassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ class MobileChangePasswordState extends State<MobileChangePassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -232,7 +232,7 @@ class MobileChangePasswordState extends State<MobileChangePassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit,
|
||||
|
||||
@@ -114,7 +114,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).ok,
|
||||
@@ -1632,7 +1632,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
||||
),
|
||||
labelText: S.of(context).enter_coupon_code,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
return null;
|
||||
},
|
||||
),
|
||||
|
||||
@@ -248,7 +248,7 @@ class MobileCouponsState extends State<MobileCoupons> {
|
||||
Container(
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
|
||||
@@ -109,7 +109,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
|
||||
.of(context)
|
||||
.contact_name,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -164,7 +164,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
|
||||
.of(context)
|
||||
.mobile_phone_number,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -196,7 +196,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
|
||||
.of(context)
|
||||
.street_line_1,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -250,7 +250,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
|
||||
.of(context)
|
||||
.city,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -320,7 +320,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
|
||||
.of(context)
|
||||
.postal_code,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value
|
||||
.trim()
|
||||
.isEmpty) {
|
||||
@@ -365,7 +365,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
|
||||
.of(context)
|
||||
.email,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.isNotEmpty && !EmailValidator.validate(value)) {
|
||||
return S
|
||||
.of(context)
|
||||
|
||||
@@ -90,7 +90,7 @@ class MobileForgotPasswordState extends State<MobileForgotPassword> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).mobile_or_email_is_required;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ class MobileForgotPasswordState extends State<MobileForgotPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).verification_code_is_required;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ class MobileForgotPasswordState extends State<MobileForgotPassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).verify,
|
||||
|
||||
@@ -103,7 +103,7 @@ class MobileLoginState extends State<MobileLogin> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).this_field_is_required;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ class MobileLoginState extends State<MobileLogin> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
obscureText: passwordVisible,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ class MobileLoginState extends State<MobileLogin> {
|
||||
padding: EdgeInsets.only(top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).login,
|
||||
|
||||
@@ -687,7 +687,7 @@ class MobileMeState extends State<MobileMe> {
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
textStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
|
||||
@@ -96,7 +96,7 @@ class MobileNewAddressState extends State<MobileNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).contact_name,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).contact_name_is_required;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class MobileNewAddressState extends State<MobileNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).mobile_phone_number,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).mobile_phone_number_is_required;
|
||||
}
|
||||
@@ -165,7 +165,7 @@ class MobileNewAddressState extends State<MobileNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).street_line_1,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).street_line_1_is_required;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ class MobileNewAddressState extends State<MobileNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).city,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).city_is_required;
|
||||
}
|
||||
@@ -255,7 +255,7 @@ class MobileNewAddressState extends State<MobileNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).postal_code,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).postal_code_is_required;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ class MobileNewAddressState extends State<MobileNewAddress> {
|
||||
),
|
||||
labelText: S.of(context).email,
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.isNotEmpty && !EmailValidator.validate(value)) {
|
||||
return S.of(context).email_is_not_valid;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ class MobileNewCommentState extends State<MobileNewComment> {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
|
||||
@@ -110,7 +110,7 @@ class MobileNewTicketState extends State<MobileNewTicket> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).this_field_is_required;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ class MobileNewTicketState extends State<MobileNewTicket> {
|
||||
padding: EdgeInsets.only(top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit,
|
||||
@@ -374,7 +374,7 @@ class MobileNewTicketState extends State<MobileNewTicket> {
|
||||
ElevatedButton(
|
||||
child: Text(S.of(context).yes_i_am_sure),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -87,7 +87,7 @@ class MobileNewUserState extends State<MobileNewUser> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).mobile_or_email_is_required;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ class MobileNewUserState extends State<MobileNewUser> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).verification_code_is_required;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ class MobileNewUserState extends State<MobileNewUser> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).register,
|
||||
|
||||
@@ -1145,7 +1145,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
|
||||
S.of(context).no,
|
||||
),
|
||||
style: TextButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -234,7 +234,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Colors.redAccent,
|
||||
backgroundColor: Colors.redAccent,
|
||||
),
|
||||
onPressed: () {
|
||||
Routes.router.navigateTo(context, '/paynow/${order.id}');
|
||||
@@ -249,7 +249,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo);
|
||||
@@ -266,7 +266,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.orderAgain(context, order.cartInfo);
|
||||
|
||||
@@ -96,7 +96,7 @@ class MobileRenewLicenseState extends State<MobileRenewLicense> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).please_enter_group_number;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class MobileResetPasswordState extends State<MobileResetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ class MobileResetPasswordState extends State<MobileResetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ class MobileResetPasswordState extends State<MobileResetPassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit,
|
||||
|
||||
@@ -105,7 +105,7 @@ class MobileSetPasswordState extends State<MobileSetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ class MobileSetPasswordState extends State<MobileSetPassword> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ class MobileSetPasswordState extends State<MobileSetPassword> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).submit,
|
||||
|
||||
@@ -392,7 +392,7 @@ class MobileUserProfileState extends State<MobileUserProfile> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).nickname_is_required;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ class MobileViewTicketState extends State<MobileViewTicket> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: false,
|
||||
validator: (String value) {
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
return S.of(context).this_field_is_required;
|
||||
}
|
||||
@@ -338,7 +338,7 @@ class MobileViewTicketState extends State<MobileViewTicket> {
|
||||
padding: EdgeInsets.only(top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Text(
|
||||
S.of(context).reply,
|
||||
@@ -641,7 +641,7 @@ class MobileViewTicketState extends State<MobileViewTicket> {
|
||||
ElevatedButton(
|
||||
child: Text(S.of(context).yes_i_am_sure),
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user