updated new flutter version

This commit is contained in:
2022-06-30 03:47:47 -04:00
parent f504e213a0
commit bcf21d90ac
50 changed files with 360 additions and 2638 deletions

View File

@@ -4,7 +4,6 @@ import 'package:countdown/countdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_wisetronic/widgets/general/breadcrumbs.dart';
import 'package:fluttertoast/fluttertoast.dart';
import '../../generated/l10n.dart';
@@ -216,8 +215,10 @@ class DesktopChangeMobileOrEmailState extends State<DesktopChangeMobileOrEmail>
margin: EdgeInsets.only(top: 0.0, right: 16.0),
child: Align(
alignment: Alignment.centerRight,
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).submit_to_change,
style: TextStyle(

View File

@@ -280,8 +280,10 @@ class DesktopChangePasswordState extends State<DesktopChangePassword> {
padding: EdgeInsets.only(right: 16.0, top: 16.0),
child: Align(
alignment: Alignment.centerRight,
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).submit,
style: TextStyle(
@@ -319,7 +321,7 @@ class DesktopChangePasswordState extends State<DesktopChangePassword> {
title: Text(S.of(context).success),
content: Text(S.of(context).password_has_been_changed),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: () {
Navigator.of(context).pop();

View File

@@ -125,8 +125,10 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
Text(
S.of(context).no_delivery_method,
),
RaisedButton(
color: Theme.of(context).primaryColor,
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).ok,
style: TextStyle(
@@ -1215,7 +1217,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
panelController.close();
@@ -1280,7 +1282,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
panelController.close();
@@ -1385,7 +1387,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).close),
onPressed: () {
panelController.close();
@@ -1431,7 +1433,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
panelController.close();
@@ -1605,7 +1607,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
panelController.close();
@@ -1657,7 +1659,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
margin: EdgeInsets.only(left: 5.0),
child: RaisedButton(
child: ElevatedButton(
child: Text(
S.of(context).get_coupon,
),
@@ -1951,7 +1953,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
));
for (int i = 0; i < cartInfo.businessInfo.quickInputs.length; i++) {
String qi = cartInfo.businessInfo.quickInputs[i].value;
w.children.add(FlatButton(
w.children.add(TextButton(
child: Text(
qi,
style: TextStyle(
@@ -1993,7 +1995,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
panelController.close();
@@ -2002,7 +2004,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).save),
onPressed: () {
if (mounted) {
@@ -2069,7 +2071,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
),
Container(
padding: EdgeInsets.only(top: 16.0, bottom: 16.0, right: 16.0),
child: FlatButton(
child: TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
panelController.close();

View File

@@ -269,17 +269,19 @@ class DesktopCouponsState extends State<DesktopCoupons> {
),
),
Container(
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
),
child: Text(
S.of(context).redeem_coupon,
style: TextStyle(
color: Colors.white,
),
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
onPressed: () {
if (coupon.store != null) {
Routes.router.navigateTo(context, '/shop/${coupon.store.id}/na/na/na');

View File

@@ -434,7 +434,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
FlatButton(
TextButton(
child: Text(
S
.of(context)
@@ -452,7 +452,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
.of(context)
.are_you_sure_to_delete_the_address),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S
.of(context)
.cancel),
@@ -460,7 +460,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(S
.of(context)
.yes_i_am_sure),
@@ -475,7 +475,7 @@ class DesktopEditAddressState extends State<DesktopEditAddress> {
);
},
),
FlatButton(
TextButton(
child: Text(
S
.of(context)

View File

@@ -197,8 +197,10 @@ class DesktopForgotPasswordState extends State<DesktopForgotPassword> {
margin: EdgeInsets.only(top: 0.0, right: 16.0),
child: Align(
alignment: Alignment.centerRight,
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).verify,
style: TextStyle(

View File

@@ -211,7 +211,7 @@ class DesktopLoginState extends State<DesktopLogin> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
FlatButton(
TextButton(
child: Text(
S.of(context).new_user_question,
style: TextStyle(
@@ -226,7 +226,7 @@ class DesktopLoginState extends State<DesktopLogin> {
child: Text(''),
),
Container(
child: FlatButton(
child: TextButton(
child: Text(
S.of(context).forgot_password_question,
style: TextStyle(
@@ -246,8 +246,10 @@ class DesktopLoginState extends State<DesktopLogin> {
child: Container(
padding: EdgeInsets.only(
top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).login,
style: TextStyle(

View File

@@ -139,14 +139,16 @@ class MyCardsState extends State<DesktopMyCards> {
S.of(context).are_you_sure_to_remove_the_card,
),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).cancel),
color: Theme.of(context).primaryColor,
onPressed: () {
Navigator.of(context).pop();
},
style: TextButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
),
FlatButton(
TextButton(
child: Text(S.of(context).yes_i_am_sure),
onPressed: () {
Navigator.of(context).pop();

View File

@@ -358,7 +358,7 @@ class DesktopNewAddressState extends State<DesktopNewAddress> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SizedBox(),
FlatButton(
TextButton(
child: Text(
S.of(context).save
),

View File

@@ -167,14 +167,16 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
child: SizedBox(
width: 150.0,
height: 36.0,
child: RaisedButton(
child: ElevatedButton(
child: Text(
S.of(context).submit,
style: TextStyle(
color: Colors.white,
),
),
color: Theme.of(context).primaryColor,
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
onPressed: () {
_submit();
},
@@ -238,14 +240,16 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
title: Text(S.of(context).warning),
content: Text(S.of(context).are_you_sure_to_remove_the_picture),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
color: Theme.of(context).primaryColor,
style: TextButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
),
FlatButton(
TextButton(
child: Text(S.of(context).yes_i_am_sure),
onPressed: () {
Navigator.of(context).pop();

View File

@@ -208,8 +208,10 @@ class DesktopNewTicketState extends State<DesktopNewTicket> {
alignment: Alignment.centerRight,
child: Container(
padding: EdgeInsets.only(top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).login,
style: TextStyle(
@@ -389,15 +391,17 @@ class DesktopNewTicketState extends State<DesktopNewTicket> {
title: Text(S.of(context).warning),
content: Text(S.of(context).are_you_sure_to_remove_the_picture),
actions: [
FlatButton(
TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
),
RaisedButton(
ElevatedButton(
child: Text(S.of(context).yes_i_am_sure),
color: Theme.of(context).primaryColor,
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
onPressed: () {
Navigator.of(context).pop();
setState(() {
@@ -439,7 +443,7 @@ class DesktopNewTicketState extends State<DesktopNewTicket> {
title: Text(S.of(context).success),
content: Text(S.of(context).ticket_created_success),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: () {
Routes.router.navigateTo(context, '/my-support/${widget.businessId}', replace: true);

View File

@@ -2,7 +2,6 @@
import 'package:countdown/countdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_wisetronic/widgets/general/breadcrumbs.dart';
import 'package:fluttertoast/fluttertoast.dart';
import '../../constants.dart';
@@ -195,8 +194,10 @@ class DesktopNewUserState extends State<DesktopNewUser> {
margin: EdgeInsets.only(top: 0.0, right: 16.0),
child: Align(
alignment: Alignment.centerRight,
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).register,
style: TextStyle(

View File

@@ -1001,7 +1001,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
Container(
padding: EdgeInsets.only(right: 10.0),
child: order.status == Constants.STATUS_PENDING && order.paymentStatus == Constants.PAYMENT_STATUS_UNPAID ?
FlatButton(
TextButton(
child: Text(
S.of(context).cancel_order,
style: TextStyle(
@@ -1015,7 +1015,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
) : SizedBox.shrink(),
),
Container(
child: order.status == Constants.STATUS_COMPLETE && !order.hasComment ? RaisedButton(
child: order.status == Constants.STATUS_COMPLETE && !order.hasComment ? ElevatedButton(
child: Text(
S.of(context).comment,
style: TextStyle(
@@ -1033,7 +1033,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
child: order.paymentStatus != Constants.PAYMENT_STATUS_PAID
&& order.status != Constants.STATUS_CANCELLED
&& order.status != Constants.STATUS_COMPLETE ?
FlatButton(
TextButton(
child: Text(
S.of(context).pay_now,
style: TextStyle(
@@ -1044,7 +1044,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
onPressed: () {
Routes.router.navigateTo(context, '/paynow/${order.id}');
},
) : FlatButton(
) : TextButton(
child: Text(
S.of(context).order_again,
style: TextStyle(
@@ -1172,16 +1172,18 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
title: Text(S.of(context).warning),
content: Text(S.of(context).are_you_sure_to_cancel_the_order),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(
S.of(context).no,
),
color: Theme.of(context).primaryColor,
style: TextButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
onPressed: () {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(
S.of(context).yes_i_am_sure,
),

View File

@@ -216,7 +216,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
Row row3 = Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
RaisedButton(
ElevatedButton(
child: Text(
S.of(context).detail,
),
@@ -232,7 +232,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
row3.children.add(
Padding(
padding: EdgeInsets.only(left: 10.0),
child: RaisedButton(
child: ElevatedButton(
child: Text(
S.of(context).comment,
),
@@ -254,7 +254,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
if (order.paymentStatus != Constants.PAYMENT_STATUS_PAID
&& order.status != Constants.STATUS_CANCELLED
&& order.status != Constants.STATUS_COMPLETE) {
row2.children.add(RaisedButton(
row2.children.add(ElevatedButton(
child: Text(
S.of(context)
.pay_now,
@@ -262,20 +262,24 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
color: Colors.white,
),
),
color: Colors.redAccent,
style: ElevatedButton.styleFrom(
primary: Colors.redAccent,
),
onPressed: () {
Routes.router.navigateTo(context, '/paynow/${order.id}');
},
));
} else {
row2.children.add(RaisedButton(
row2.children.add(ElevatedButton(
child: Text(
S.of(context).order_again,
style: TextStyle(
color: Colors.white,
),
),
color: Theme.of(context).primaryColor,
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
onPressed: () {
Utils.orderAgain(context, order.cartInfo);
},
@@ -283,14 +287,16 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
}
} else {
row2.children.add(row3);
row2.children.add(RaisedButton(
row2.children.add(ElevatedButton(
child: Text(
S.of(context).order_again,
style: TextStyle(
color: Colors.white,
),
),
color: Theme.of(context).primaryColor,
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
onPressed: () {
Utils.orderAgain(context, order.cartInfo);
},

View File

@@ -177,8 +177,10 @@ class DesktopResetPasswordState extends State<DesktopResetPassword> {
padding: EdgeInsets.only(right: 0.0, top: 16.0),
child: Align(
alignment: Alignment.centerRight,
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).submit,
style: TextStyle(
@@ -276,7 +278,7 @@ class DesktopResetPasswordState extends State<DesktopResetPassword> {
title: Text(S.of(context).success),
content: Text(S.of(context).reset_password_success),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: () {
Routes.router.navigateTo(context, '/login', replace: true, clearStack: false);

View File

@@ -177,8 +177,10 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
padding: EdgeInsets.only(right: 16.0, top: 16.0),
child: Align(
alignment: Alignment.centerRight,
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).submit,
style: TextStyle(
@@ -276,7 +278,7 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
title: Text(S.of(context).success),
content: Text(S.of(context).reset_password_success),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: () {
Routes.router.navigateTo(context, '/login', replace: true, clearStack: false);

View File

@@ -13,7 +13,6 @@ import '../../store/store.dart';
import '../../utils/http_util.dart';
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
import '../../utils/utils.dart';
import '../../widgets/general/breadcrumbs.dart';
class DesktopUserProfile extends StatefulWidget {
final Key key;
@@ -435,7 +434,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
),
),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(
S.of(context).cancel
),
@@ -443,7 +442,7 @@ class DesktopUserProfileState extends State<DesktopUserProfile> {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(
S.of(context).submit_to_change,
),

View File

@@ -192,8 +192,10 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
alignment: Alignment.centerRight,
child: Container(
padding: EdgeInsets.only(top: 20.0, left: 16.0, right: 16.0, bottom: 20.0),
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
child: Text(
S.of(context).reply,
style: TextStyle(
@@ -633,15 +635,17 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
title: Text(S.of(context).warning),
content: Text(S.of(context).are_you_sure_to_remove_the_picture),
actions: [
FlatButton(
TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
),
RaisedButton(
ElevatedButton(
child: Text(S.of(context).yes_i_am_sure),
color: Theme.of(context).primaryColor,
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
onPressed: () {
Navigator.of(context).pop();
setState(() {
@@ -685,7 +689,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
title: Text(S.of(context).success),
content: Text(S.of(context).ticket_created_success),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: () {
Routes.router.navigateTo(context,

File diff suppressed because it is too large Load Diff