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

@@ -1,6 +1,7 @@
class Constants {
static const bool DEBUG = false;
static const bool ENABLE_NATIVE_PAY = false;
static const bool isPreview = false;
@@ -20,10 +21,9 @@ class Constants {
static const int FONT_WISETRONIC = 0xe812;
static const int FONT_TOPTONS = 0xe813;
static const bool DEBUG = false;
static const int BUSINESS_ID = 310; //310, 680, 357(notjust), 651(kiosk);
static const String APP_TITLE = 'MiniPOS Ponit of Sale System';
static const String BASE_API_URL = 'https://api.minipos.us/'; //'https://sandbox.minipos.us/', 'https://api.minipos.us/'
static const String BASE_API_URL = DEBUG ? 'https://sandbox.minipos.us/' : 'https://api.minipos.us/'; //'https://sandbox.minipos.us/', 'https://api.minipos.us/'
static const String TUTORIAL_URL = 'https://archive.wisetronic.com/wisetronic-products-documentation/';
static const String API_SECRET = 'pei326sami1223HellowWorldabcdEd';
static const KEY_USER_ID = 'user_id';

View File

@@ -19,7 +19,7 @@ AlertDialog logoutDialog(BuildContext context) {
.of(context)
.are_you_sure_to_logout),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S
.of(context)
.cancel),
@@ -27,7 +27,7 @@ AlertDialog logoutDialog(BuildContext context) {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(S
.of(context)
.yes_i_am_sure),

View File

@@ -525,7 +525,7 @@ class Utils {
content: Text(message),
actions: actions == null
? <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: onOk == null
? () {
@@ -740,13 +740,13 @@ class Utils {
title: Text(S.of(context).warning),
content: Text(S.of(context).are_you_sure_to_empty_basket),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(S.of(context).yes_i_am_sure),
onPressed: () {
store.dispatch(new UpdateCartInfo(

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

View File

@@ -22,6 +22,7 @@ class AddRemoveButton extends StatefulWidget {
final bool addOnly;
final int cartLineItemIndex;
final bool addToBasket;
final bool onHovor;
AddRemoveButton({
this.product,
@@ -29,6 +30,7 @@ class AddRemoveButton extends StatefulWidget {
this.addOnly = false,
this.cartLineItemIndex = -1,
this.addToBasket = false,
this.onHovor = false,
});
@override
@@ -72,7 +74,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
return Container(
padding: EdgeInsets.only(top: 5.0, bottom: 5.0, left: 32.0, right: 32.0),
child: Text(
'x$_qty'
'x$_qty'
),
);
}
@@ -121,13 +123,16 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
padding: EdgeInsets.all(10),
position: BadgePosition.topEnd(top: -15, end: -10),
badgeColor: Colors.lightBlueAccent,
child: RaisedButton.icon(
padding: EdgeInsets.only(left: 32, right: 32, top: 20, bottom: 20),
elevation: 2.0,
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(10.0),
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
primary: Colors.redAccent,
onPrimary: Colors.white,
padding: EdgeInsets.only(left: 32, right: 32, top: 20, bottom: 20),
elevation: 2.0,
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(10.0),
),
),
color: Colors.redAccent,
icon: Icon(
Icons.shopping_basket_outlined,
size: 32.0,
@@ -147,13 +152,15 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
),
);
} else {
return RaisedButton.icon(
padding: EdgeInsets.only(left: 32, right: 32, top: 20, bottom: 20),
elevation: 2.0,
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(10.0),
return ElevatedButton.icon(
style: ElevatedButton.styleFrom(
primary: Colors.redAccent,
padding: EdgeInsets.only(left: 32, right: 32, top: 20, bottom: 20),
elevation: 2.0,
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(10.0),
),
),
color: Colors.redAccent,
icon: Icon(
Icons.shopping_basket_outlined,
size: 32.0,
@@ -172,7 +179,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
},
);
}
}else if (widget.addOnly) {
} else if (widget.addOnly) {
return Container(
key: startKey,
padding: EdgeInsets.all(0.0),
@@ -235,6 +242,9 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
],
);
} else {
if (!widget.onHovor && _qty == 0) {
return SizedBox.shrink();
}
return new Row(
key: startKey,
crossAxisAlignment: CrossAxisAlignment.end,
@@ -337,28 +347,28 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
if (widget.cartLineItemIndex != -1) {
if (cartInfo.productList[widget.cartLineItemIndex].quantity <= 1) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(S.of(context).warning),
content: Text(S.of(context).are_you_sure_to_remove_the_item),
actions: <Widget>[
FlatButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
),
FlatButton(
child: Text(S.of(context).yes_i_am_sure),
onPressed: () {
_removeCartLineItem();
Navigator.of(context).pop();
},
),
],
);
}
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(S.of(context).warning),
content: Text(S.of(context).are_you_sure_to_remove_the_item),
actions: <Widget>[
TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).maybePop();
},
),
TextButton(
child: Text(S.of(context).yes_i_am_sure),
onPressed: () {
_removeCartLineItem();
Navigator.of(context).maybePop();
},
),
],
);
}
);
} else {
_removeCartLineItem();

View File

@@ -1,14 +1,13 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import '../../widgets/general/text_link.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../generated/l10n.dart';
import '../../utils/utils.dart';
import '../../utils/extensions.dart';
import 'package:universal_io/io.dart';
import '../../constants.dart';
import '../../generated/l10n.dart';
import '../../utils/extensions.dart';
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
import '../../utils/utils.dart';
class DownloadItem extends StatefulWidget {
final dynamic desc;
@@ -242,9 +241,11 @@ class DownloadItemState extends State<DownloadItem> {
),
);
} else if (downloadUrl != null && downloadUrl.isNotEmpty) {
return RaisedButton(
color: Theme.of(context).primaryColor,
padding: EdgeInsets.all(8.0),
return ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
padding: EdgeInsets.all(8)
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -95,7 +95,7 @@ class PaymentVerificationCodeDialogState extends State<PaymentVerificationCodeDi
title: Text(S.of(context).error),
content: Text(S.of(context).wrong_payment_verification_code),
actions: [
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: () {
_pinPutController.clear();
@@ -124,7 +124,7 @@ class PaymentVerificationCodeDialogState extends State<PaymentVerificationCodeDi
],
),
actions: [
FlatButton(
TextButton(
child: Text(S.of(context).close),
onPressed: () {
Navigator.of(context).pop();

View File

@@ -215,7 +215,7 @@ class _SlidingUpPanelState extends State<SlidingUpPanel> with SingleTickerProvid
ScrollController _sc;
bool _scrollingEnabled = false;
VelocityTracker _vt = new VelocityTracker();
VelocityTracker _vt = VelocityTracker.withKind(PointerDeviceKind.touch);
bool _isPanelVisible = true;
@@ -312,7 +312,7 @@ class _SlidingUpPanelState extends State<SlidingUpPanel> with SingleTickerProvid
);
},
child: Stack(
overflow: Overflow.visible,
clipBehavior: Clip.none,
children: <Widget>[
//open panel

View File

@@ -35,8 +35,8 @@ class MobileAttributeSelection extends StatefulWidget {
class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
Product product;
int index;
FlatButton previousButton;
FlatButton nextButton;
TextButton previousButton;
TextButton nextButton;
bool previousButtonEnable;
bool nextButtonEnable;
@@ -159,12 +159,12 @@ class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
}
Widget _getProductContent() {
previousButton = new FlatButton(
previousButton = TextButton(
onPressed: previousButtonEnable ? _goPrevious : null,
child: new Text(S.of(context).previous),
);
nextButton = new FlatButton(
nextButton = TextButton(
onPressed: nextButtonEnable ? _goNext : null,
child: new Text(
product.productAttributes.length > index + 1 ? nextText : finishText

View File

@@ -221,8 +221,10 @@ class MobileChangeMobileOrEmailState extends State<MobileChangeMobileOrEmail> {
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

@@ -230,8 +230,10 @@ class MobileChangePasswordState extends State<MobileChangePassword> {
padding: EdgeInsets.only(right: 16.0, top: 16.0, bottom: 20.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(
@@ -257,7 +259,7 @@ class MobileChangePasswordState extends State<MobileChangePassword> {
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

@@ -112,8 +112,10 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
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(
@@ -1195,7 +1197,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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();
@@ -1260,7 +1262,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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();
@@ -1365,7 +1367,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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();
@@ -1411,7 +1413,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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();
@@ -1585,7 +1587,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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();
@@ -1637,7 +1639,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
Container(
margin: EdgeInsets.only(left: 5.0),
child: RaisedButton(
child: ElevatedButton(
child: Text(
S.of(context).get_coupon,
),
@@ -1931,7 +1933,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
));
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(
@@ -1973,7 +1975,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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();
@@ -1982,7 +1984,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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) {
@@ -2049,7 +2051,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
),
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

@@ -246,17 +246,19 @@ class MobileCouponsState extends State<MobileCoupons> {
),
),
Container(
child: RaisedButton(
color: Theme.of(context).primaryColor,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
),
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

@@ -410,7 +410,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
FlatButton(
TextButton(
child: Text(
S
.of(context)
@@ -428,7 +428,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
.of(context)
.are_you_sure_to_delete_the_address),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S
.of(context)
.cancel),
@@ -436,7 +436,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(S
.of(context)
.yes_i_am_sure),
@@ -451,7 +451,7 @@ class MobileEditAddressState extends State<MobileEditAddress> {
);
},
),
FlatButton(
TextButton(
child: Text(
S
.of(context)

View File

@@ -204,8 +204,10 @@ class MobileForgotPasswordState extends State<MobileForgotPassword> {
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

@@ -160,7 +160,7 @@ class MobileLoginState extends State<MobileLogin> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
FlatButton(
TextButton(
child: Text(
S.of(context).new_user_question,
style: TextStyle(
@@ -175,7 +175,7 @@ class MobileLoginState extends State<MobileLogin> {
child: Text(''),
),
Container(
child: FlatButton(
child: TextButton(
child: Text(
S.of(context).forgot_password_question,
style: TextStyle(
@@ -194,8 +194,10 @@ class MobileLoginState extends State<MobileLogin> {
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(

View File

@@ -405,7 +405,7 @@ class MobileMeState extends State<MobileMe> {
S.of(context).feature_not_available_web,
),
actions: [
FlatButton(
TextButton(
onPressed: () {
Routes.router.pop(context);
},
@@ -679,15 +679,19 @@ class MobileMeState extends State<MobileMe> {
title: Text(S.of(context).warning),
content: Text(S.of(context).email_needed),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
),
RaisedButton(
color: Theme.of(context).primaryColor,
textColor: Colors.white,
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Theme.of(context).primaryColor,
textStyle: TextStyle(
color: Colors.white,
),
),
child: Text(S.of(context).ok),
onPressed: () {
Navigator.of(context).pop();

View File

@@ -113,14 +113,16 @@ class MyCardsState extends State<MobileMyCards> {
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,
style: TextButton.styleFrom(
primary: Theme.of(context).primaryColor,
),
onPressed: () {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(S.of(context).yes_i_am_sure),
onPressed: () {
Navigator.of(context).pop();

View File

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

View File

@@ -204,14 +204,16 @@ class MobileNewCommentState extends State<MobileNewComment> {
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

@@ -160,8 +160,10 @@ class MobileNewTicketState extends State<MobileNewTicket> {
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).submit,
style: TextStyle(
@@ -233,7 +235,7 @@ class MobileNewTicketState extends State<MobileNewTicket> {
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);
@@ -363,15 +365,17 @@ class MobileNewTicketState extends State<MobileNewTicket> {
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(() {

View File

@@ -201,8 +201,10 @@ class MobileNewUserState extends State<MobileNewUser> {
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

@@ -984,7 +984,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
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,
),
@@ -994,7 +994,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
) : 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,
),
@@ -1009,14 +1009,14 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
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,
),
onPressed: () {
Routes.router.navigateTo(context, '/paynow/${order.id}');
},
) : FlatButton(
) : TextButton(
child: Text(
S.of(context).order_again,
),
@@ -1140,16 +1140,18 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
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

@@ -187,7 +187,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
Row row3 = Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
RaisedButton(
ElevatedButton(
child: Text(
S.of(context).detail,
),
@@ -203,7 +203,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
row3.children.add(
Padding(
padding: EdgeInsets.only(left: 10.0),
child: RaisedButton(
child: ElevatedButton(
child: Text(
S.of(context).comment,
),
@@ -225,7 +225,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
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,
@@ -233,20 +233,24 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
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);
},
@@ -254,14 +258,16 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
}
} 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

@@ -193,8 +193,10 @@ class MobileResetPasswordState extends State<MobileResetPassword> {
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(
@@ -220,7 +222,7 @@ class MobileResetPasswordState extends State<MobileResetPassword> {
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

@@ -194,8 +194,10 @@ class MobileSetPasswordState extends State<MobileSetPassword> {
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(
@@ -221,7 +223,7 @@ class MobileSetPasswordState extends State<MobileSetPassword> {
title: Text(S.of(context).success),
content: Text(S.of(context).user_account_created_success),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(S.of(context).ok),
onPressed: () {
Routes.router.navigateTo(context, '/login', replace: true, clearStack: false);

View File

@@ -402,7 +402,7 @@ class MobileUserProfileState extends State<MobileUserProfile> {
),
),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(
S.of(context).cancel
),
@@ -410,7 +410,7 @@ class MobileUserProfileState extends State<MobileUserProfile> {
Navigator.of(context).pop();
},
),
FlatButton(
TextButton(
child: Text(
S.of(context).submit_to_change,
),

View File

@@ -337,8 +337,10 @@ class MobileViewTicketState extends State<MobileViewTicket> {
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(
@@ -631,15 +633,17 @@ class MobileViewTicketState extends State<MobileViewTicket> {
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(() {
@@ -683,7 +687,7 @@ class MobileViewTicketState extends State<MobileViewTicket> {
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,

View File

@@ -534,7 +534,7 @@ class ShopState extends State<Shop>
action: SnackBarAction(
label: S.of(context).close,
onPressed: () {
_scaffoldKey.currentState.hideCurrentSnackBar();
ScaffoldMessenger.of(context).hideCurrentSnackBar();
},
),
content: Container(