diff --git a/lib/widgets/desktop/create_online_store_1.dart b/lib/widgets/desktop/create_online_store_1.dart index 416c860..587825f 100644 --- a/lib/widgets/desktop/create_online_store_1.dart +++ b/lib/widgets/desktop/create_online_store_1.dart @@ -283,7 +283,7 @@ class CreateOnlineStore1State extends State { fontSize: 18.0 ), autofocus: true, - validator: (String value) { + validator: (String? value) { if (value.trim().isEmpty) { return S.of(context).domains_separated_comma; } diff --git a/lib/widgets/desktop/desktop_change_mobile_or_email.dart b/lib/widgets/desktop/desktop_change_mobile_or_email.dart index 83dfebf..9e7717c 100644 --- a/lib/widgets/desktop/desktop_change_mobile_or_email.dart +++ b/lib/widgets/desktop/desktop_change_mobile_or_email.dart @@ -87,7 +87,7 @@ class DesktopChangeMobileOrEmailState extends State 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 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 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, diff --git a/lib/widgets/desktop/desktop_change_password.dart b/lib/widgets/desktop/desktop_change_password.dart index b6e0203..75f2488 100644 --- a/lib/widgets/desktop/desktop_change_password.dart +++ b/lib/widgets/desktop/desktop_change_password.dart @@ -137,7 +137,7 @@ class DesktopChangePasswordState extends State { 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 { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).submit, diff --git a/lib/widgets/desktop/desktop_checkout.dart b/lib/widgets/desktop/desktop_checkout.dart index a36599a..a171431 100644 --- a/lib/widgets/desktop/desktop_checkout.dart +++ b/lib/widgets/desktop/desktop_checkout.dart @@ -127,7 +127,7 @@ class DesktopCheckoutState extends State 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 with SingleTickerProvi ), labelText: S.of(context).enter_coupon_code, ), - validator: (String value) { + validator: (String? value) { return null; }, ), diff --git a/lib/widgets/desktop/desktop_coupons.dart b/lib/widgets/desktop/desktop_coupons.dart index f3c8541..d59408d 100644 --- a/lib/widgets/desktop/desktop_coupons.dart +++ b/lib/widgets/desktop/desktop_coupons.dart @@ -271,7 +271,7 @@ class DesktopCouponsState extends State { Container( child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20.0), ), diff --git a/lib/widgets/desktop/desktop_edit_address.dart b/lib/widgets/desktop/desktop_edit_address.dart index c05010d..5fff4e7 100644 --- a/lib/widgets/desktop/desktop_edit_address.dart +++ b/lib/widgets/desktop/desktop_edit_address.dart @@ -105,7 +105,7 @@ class DesktopEditAddressState extends State { .of(context) .contact_name, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -160,7 +160,7 @@ class DesktopEditAddressState extends State { .of(context) .mobile_phone_number, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -192,7 +192,7 @@ class DesktopEditAddressState extends State { .of(context) .street_line_1, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -246,7 +246,7 @@ class DesktopEditAddressState extends State { .of(context) .city, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -316,7 +316,7 @@ class DesktopEditAddressState extends State { .of(context) .postal_code, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -361,7 +361,7 @@ class DesktopEditAddressState extends State { .of(context) .email, ), - validator: (String value) { + validator: (String? value) { if (value.isNotEmpty && !EmailValidator.validate(value)) { return S .of(context) diff --git a/lib/widgets/desktop/desktop_forgot_password.dart b/lib/widgets/desktop/desktop_forgot_password.dart index bca07d9..e130b55 100644 --- a/lib/widgets/desktop/desktop_forgot_password.dart +++ b/lib/widgets/desktop/desktop_forgot_password.dart @@ -83,7 +83,7 @@ class DesktopForgotPasswordState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).verify, diff --git a/lib/widgets/desktop/desktop_login.dart b/lib/widgets/desktop/desktop_login.dart index 8916c83..aeedb35 100644 --- a/lib/widgets/desktop/desktop_login.dart +++ b/lib/widgets/desktop/desktop_login.dart @@ -149,7 +149,7 @@ class DesktopLoginState extends State { ), 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 { ), 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 { 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, diff --git a/lib/widgets/desktop/desktop_new_address.dart b/lib/widgets/desktop/desktop_new_address.dart index d7aacc7..d3e49d6 100644 --- a/lib/widgets/desktop/desktop_new_address.dart +++ b/lib/widgets/desktop/desktop_new_address.dart @@ -97,7 +97,7 @@ class DesktopNewAddressState extends State { ), 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 { ), 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 { ), 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 { ), 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 { ), 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 { ), 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; } diff --git a/lib/widgets/desktop/desktop_new_comment.dart b/lib/widgets/desktop/desktop_new_comment.dart index b322f1b..77498f2 100644 --- a/lib/widgets/desktop/desktop_new_comment.dart +++ b/lib/widgets/desktop/desktop_new_comment.dart @@ -175,7 +175,7 @@ class DesktopNewCommentState extends State { ), ), style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), onPressed: () { _submit(); @@ -246,7 +246,7 @@ class DesktopNewCommentState extends State { Navigator.of(context).pop(); }, style: TextButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), ), TextButton( diff --git a/lib/widgets/desktop/desktop_new_ticket.dart b/lib/widgets/desktop/desktop_new_ticket.dart index 3bec6a5..ec1e40f 100644 --- a/lib/widgets/desktop/desktop_new_ticket.dart +++ b/lib/widgets/desktop/desktop_new_ticket.dart @@ -154,7 +154,7 @@ class DesktopNewTicketState extends State { 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 { 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 { 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(); diff --git a/lib/widgets/desktop/desktop_new_user.dart b/lib/widgets/desktop/desktop_new_user.dart index c59905e..de7fbe1 100644 --- a/lib/widgets/desktop/desktop_new_user.dart +++ b/lib/widgets/desktop/desktop_new_user.dart @@ -80,7 +80,7 @@ class DesktopNewUserState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).register, diff --git a/lib/widgets/desktop/desktop_order_detail.dart b/lib/widgets/desktop/desktop_order_detail.dart index 860738d..b4f6491 100644 --- a/lib/widgets/desktop/desktop_order_detail.dart +++ b/lib/widgets/desktop/desktop_order_detail.dart @@ -1177,7 +1177,7 @@ class DesktopOrderDetailState extends State { S.of(context).no, ), style: TextButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), onPressed: () { Navigator.of(context).pop(); diff --git a/lib/widgets/desktop/desktop_orders.dart b/lib/widgets/desktop/desktop_orders.dart index e8d2d16..0ad46a7 100644 --- a/lib/widgets/desktop/desktop_orders.dart +++ b/lib/widgets/desktop/desktop_orders.dart @@ -263,7 +263,7 @@ class DesktopOrdersState extends State 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 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 with SingleTickerProviderS ), ), style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), onPressed: () { Utils.orderAgain(context, order.cartInfo); diff --git a/lib/widgets/desktop/desktop_renew_license.dart b/lib/widgets/desktop/desktop_renew_license.dart index 7e1d834..9eb2026 100644 --- a/lib/widgets/desktop/desktop_renew_license.dart +++ b/lib/widgets/desktop/desktop_renew_license.dart @@ -133,7 +133,7 @@ class DesktopRenewLicenseState extends State { fontSize: 18.0 ), autofocus: true, - validator: (String value) { + validator: (String? value) { if (value.trim().isEmpty) { return S.of(context).please_enter_group_number; } diff --git a/lib/widgets/desktop/desktop_reset_password.dart b/lib/widgets/desktop/desktop_reset_password.dart index a1ca1fc..0f3762d 100644 --- a/lib/widgets/desktop/desktop_reset_password.dart +++ b/lib/widgets/desktop/desktop_reset_password.dart @@ -92,7 +92,7 @@ class DesktopResetPasswordState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).submit, diff --git a/lib/widgets/desktop/desktop_set_password.dart b/lib/widgets/desktop/desktop_set_password.dart index af24f70..0c10c9d 100644 --- a/lib/widgets/desktop/desktop_set_password.dart +++ b/lib/widgets/desktop/desktop_set_password.dart @@ -92,7 +92,7 @@ class DesktopSetPasswordState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).submit, diff --git a/lib/widgets/desktop/desktop_user_profile.dart b/lib/widgets/desktop/desktop_user_profile.dart index 35d4d65..4e53ba2 100644 --- a/lib/widgets/desktop/desktop_user_profile.dart +++ b/lib/widgets/desktop/desktop_user_profile.dart @@ -424,7 +424,7 @@ class DesktopUserProfileState extends State { fontSize: 18.0 ), autofocus: true, - validator: (String value) { + validator: (String? value) { if (value.trim().isEmpty) { return S.of(context).nickname_is_required; } diff --git a/lib/widgets/desktop/desktop_view_ticket.dart b/lib/widgets/desktop/desktop_view_ticket.dart index 00f9b30..54b6a5f 100644 --- a/lib/widgets/desktop/desktop_view_ticket.dart +++ b/lib/widgets/desktop/desktop_view_ticket.dart @@ -143,7 +143,7 @@ class DesktopViewTicketState extends State { 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 { 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 { 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(); diff --git a/lib/widgets/general/add_remove_button.dart b/lib/widgets/general/add_remove_button.dart index fe407bb..78cc8aa 100644 --- a/lib/widgets/general/add_remove_button.dart +++ b/lib/widgets/general/add_remove_button.dart @@ -125,7 +125,7 @@ class AddRemoveButtonState extends State { 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 { } 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( diff --git a/lib/widgets/general/download_item.dart b/lib/widgets/general/download_item.dart index e9975c4..46afa5d 100644 --- a/lib/widgets/general/download_item.dart +++ b/lib/widgets/general/download_item.dart @@ -244,7 +244,7 @@ class DownloadItemState extends State { } 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( diff --git a/lib/widgets/mobile/create_online_store_1.dart b/lib/widgets/mobile/create_online_store_1.dart index 8abcaa8..b6424d0 100644 --- a/lib/widgets/mobile/create_online_store_1.dart +++ b/lib/widgets/mobile/create_online_store_1.dart @@ -230,7 +230,7 @@ class CreateOnlineStore1State extends State { fontSize: 18.0 ), autofocus: true, - validator: (String value) { + validator: (String? value) { if (value.trim().isEmpty) { return S.of(context).domains_separated_comma; } diff --git a/lib/widgets/mobile/mobile_change_mobile_or_email.dart b/lib/widgets/mobile/mobile_change_mobile_or_email.dart index 626ae79..8423325 100644 --- a/lib/widgets/mobile/mobile_change_mobile_or_email.dart +++ b/lib/widgets/mobile/mobile_change_mobile_or_email.dart @@ -93,7 +93,7 @@ class MobileChangeMobileOrEmailState extends State { 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 { 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 { 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, diff --git a/lib/widgets/mobile/mobile_change_password.dart b/lib/widgets/mobile/mobile_change_password.dart index b3f2b0c..e892a74 100644 --- a/lib/widgets/mobile/mobile_change_password.dart +++ b/lib/widgets/mobile/mobile_change_password.dart @@ -87,7 +87,7 @@ class MobileChangePasswordState extends State { 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 { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).submit, diff --git a/lib/widgets/mobile/mobile_checkout.dart b/lib/widgets/mobile/mobile_checkout.dart index 1974db2..fdca378 100644 --- a/lib/widgets/mobile/mobile_checkout.dart +++ b/lib/widgets/mobile/mobile_checkout.dart @@ -114,7 +114,7 @@ class MobileCheckoutState extends State 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 with SingleTickerProvide ), labelText: S.of(context).enter_coupon_code, ), - validator: (String value) { + validator: (String? value) { return null; }, ), diff --git a/lib/widgets/mobile/mobile_coupons.dart b/lib/widgets/mobile/mobile_coupons.dart index d893990..1016eaf 100644 --- a/lib/widgets/mobile/mobile_coupons.dart +++ b/lib/widgets/mobile/mobile_coupons.dart @@ -248,7 +248,7 @@ class MobileCouponsState extends State { Container( child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20), ), diff --git a/lib/widgets/mobile/mobile_edit_address.dart b/lib/widgets/mobile/mobile_edit_address.dart index dbabd81..ab32977 100644 --- a/lib/widgets/mobile/mobile_edit_address.dart +++ b/lib/widgets/mobile/mobile_edit_address.dart @@ -109,7 +109,7 @@ class MobileEditAddressState extends State { .of(context) .contact_name, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -164,7 +164,7 @@ class MobileEditAddressState extends State { .of(context) .mobile_phone_number, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -196,7 +196,7 @@ class MobileEditAddressState extends State { .of(context) .street_line_1, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -250,7 +250,7 @@ class MobileEditAddressState extends State { .of(context) .city, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -320,7 +320,7 @@ class MobileEditAddressState extends State { .of(context) .postal_code, ), - validator: (String value) { + validator: (String? value) { if (value .trim() .isEmpty) { @@ -365,7 +365,7 @@ class MobileEditAddressState extends State { .of(context) .email, ), - validator: (String value) { + validator: (String? value) { if (value.isNotEmpty && !EmailValidator.validate(value)) { return S .of(context) diff --git a/lib/widgets/mobile/mobile_forgot_password.dart b/lib/widgets/mobile/mobile_forgot_password.dart index d2c16b3..3d295d1 100644 --- a/lib/widgets/mobile/mobile_forgot_password.dart +++ b/lib/widgets/mobile/mobile_forgot_password.dart @@ -90,7 +90,7 @@ class MobileForgotPasswordState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).verify, diff --git a/lib/widgets/mobile/mobile_login.dart b/lib/widgets/mobile/mobile_login.dart index f1b8a6e..bf94a37 100644 --- a/lib/widgets/mobile/mobile_login.dart +++ b/lib/widgets/mobile/mobile_login.dart @@ -103,7 +103,7 @@ class MobileLoginState extends State { 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 { 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 { 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, diff --git a/lib/widgets/mobile/mobile_me.dart b/lib/widgets/mobile/mobile_me.dart index a66f7a9..4bbb679 100644 --- a/lib/widgets/mobile/mobile_me.dart +++ b/lib/widgets/mobile/mobile_me.dart @@ -687,7 +687,7 @@ class MobileMeState extends State { ), ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, textStyle: TextStyle( color: Colors.white, ), diff --git a/lib/widgets/mobile/mobile_new_address.dart b/lib/widgets/mobile/mobile_new_address.dart index 5ffe425..c1a7d14 100644 --- a/lib/widgets/mobile/mobile_new_address.dart +++ b/lib/widgets/mobile/mobile_new_address.dart @@ -96,7 +96,7 @@ class MobileNewAddressState extends State { ), 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 { ), 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 { ), 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 { ), 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 { ), 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 { ), 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; } diff --git a/lib/widgets/mobile/mobile_new_comment.dart b/lib/widgets/mobile/mobile_new_comment.dart index 8edc8f7..cb1a432 100644 --- a/lib/widgets/mobile/mobile_new_comment.dart +++ b/lib/widgets/mobile/mobile_new_comment.dart @@ -210,7 +210,7 @@ class MobileNewCommentState extends State { Navigator.of(context).pop(); }, style: TextButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), ), TextButton( diff --git a/lib/widgets/mobile/mobile_new_ticket.dart b/lib/widgets/mobile/mobile_new_ticket.dart index 12ec0f4..75e5d31 100644 --- a/lib/widgets/mobile/mobile_new_ticket.dart +++ b/lib/widgets/mobile/mobile_new_ticket.dart @@ -110,7 +110,7 @@ class MobileNewTicketState extends State { 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 { 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 { 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(); diff --git a/lib/widgets/mobile/mobile_new_user.dart b/lib/widgets/mobile/mobile_new_user.dart index c7ba78b..d4af700 100644 --- a/lib/widgets/mobile/mobile_new_user.dart +++ b/lib/widgets/mobile/mobile_new_user.dart @@ -87,7 +87,7 @@ class MobileNewUserState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).register, diff --git a/lib/widgets/mobile/mobile_order_detail.dart b/lib/widgets/mobile/mobile_order_detail.dart index 9020f9e..2a20590 100644 --- a/lib/widgets/mobile/mobile_order_detail.dart +++ b/lib/widgets/mobile/mobile_order_detail.dart @@ -1145,7 +1145,7 @@ class MobileOrderDetailState extends State { S.of(context).no, ), style: TextButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), onPressed: () { Navigator.of(context).pop(); diff --git a/lib/widgets/mobile/mobile_orders.dart b/lib/widgets/mobile/mobile_orders.dart index 64eb84f..544bc4d 100644 --- a/lib/widgets/mobile/mobile_orders.dart +++ b/lib/widgets/mobile/mobile_orders.dart @@ -234,7 +234,7 @@ class MobileOrdersState extends State 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 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 with SingleTickerProviderSta ), ), style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), onPressed: () { Utils.orderAgain(context, order.cartInfo); diff --git a/lib/widgets/mobile/mobile_renew_license.dart b/lib/widgets/mobile/mobile_renew_license.dart index 2b5f7b5..b3e8936 100644 --- a/lib/widgets/mobile/mobile_renew_license.dart +++ b/lib/widgets/mobile/mobile_renew_license.dart @@ -96,7 +96,7 @@ class MobileRenewLicenseState extends State { fontSize: 18.0 ), autofocus: true, - validator: (String value) { + validator: (String? value) { if (value.trim().isEmpty) { return S.of(context).please_enter_group_number; } diff --git a/lib/widgets/mobile/mobile_reset_password.dart b/lib/widgets/mobile/mobile_reset_password.dart index b469376..976ab98 100644 --- a/lib/widgets/mobile/mobile_reset_password.dart +++ b/lib/widgets/mobile/mobile_reset_password.dart @@ -104,7 +104,7 @@ class MobileResetPasswordState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).submit, diff --git a/lib/widgets/mobile/mobile_set_password.dart b/lib/widgets/mobile/mobile_set_password.dart index b79584d..4de71ea 100644 --- a/lib/widgets/mobile/mobile_set_password.dart +++ b/lib/widgets/mobile/mobile_set_password.dart @@ -105,7 +105,7 @@ class MobileSetPasswordState extends State { 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 { 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 { alignment: Alignment.centerRight, child: ElevatedButton( style: ElevatedButton.styleFrom( - primary: Theme.of(context).primaryColor, + backgroundColor: Theme.of(context).primaryColor, ), child: Text( S.of(context).submit, diff --git a/lib/widgets/mobile/mobile_user_profile.dart b/lib/widgets/mobile/mobile_user_profile.dart index 1f0a26d..ec626fe 100644 --- a/lib/widgets/mobile/mobile_user_profile.dart +++ b/lib/widgets/mobile/mobile_user_profile.dart @@ -392,7 +392,7 @@ class MobileUserProfileState extends State { fontSize: 18.0 ), autofocus: true, - validator: (String value) { + validator: (String? value) { if (value.trim().isEmpty) { return S.of(context).nickname_is_required; } diff --git a/lib/widgets/mobile/mobile_view_ticket.dart b/lib/widgets/mobile/mobile_view_ticket.dart index a98a319..0242890 100644 --- a/lib/widgets/mobile/mobile_view_ticket.dart +++ b/lib/widgets/mobile/mobile_view_ticket.dart @@ -293,7 +293,7 @@ class MobileViewTicketState extends State { 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 { 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 { 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();