@@ -80,21 +80,24 @@ class _CartPageState extends State<CartPage> {
80
80
return ;
81
81
}
82
82
if (cartLineItems.length <= 0 ) {
83
- showEdgeAlertWith (context,
84
- title: trans (context, "Cart" ),
85
- desc: trans (context,
86
- trans (context, "You need items in your cart to checkout" )),
87
- style: EdgeAlertStyle .WARNING ,
88
- icon: Icons .shopping_cart);
83
+ showEdgeAlertWith (
84
+ context,
85
+ title: trans (context, "Cart" ),
86
+ desc: trans (context, "You need items in your cart to checkout" ),
87
+ style: EdgeAlertStyle .WARNING ,
88
+ icon: Icons .shopping_cart,
89
+ );
89
90
return ;
90
91
}
91
92
if (! cartLineItems.every (
92
93
(c) => c.stockStatus == 'instock' || c.stockStatus == 'onbackorder' )) {
93
- showEdgeAlertWith (context,
94
- title: trans (context, "Cart" ),
95
- desc: trans (context, trans (context, "There is an item out of stock" )),
96
- style: EdgeAlertStyle .WARNING ,
97
- icon: Icons .shopping_cart);
94
+ showEdgeAlertWith (
95
+ context,
96
+ title: trans (context, "Cart" ),
97
+ desc: trans (context, "There is an item out of stock" ),
98
+ style: EdgeAlertStyle .WARNING ,
99
+ icon: Icons .shopping_cart,
100
+ );
98
101
return ;
99
102
}
100
103
CheckoutSession .getInstance.initSession ();
@@ -120,7 +123,7 @@ class _CartPageState extends State<CartPage> {
120
123
showEdgeAlertWith (
121
124
context,
122
125
title: trans (context, "Cart" ),
123
- desc: trans (context, trans (context, "Maximum stock reached" ) ),
126
+ desc: trans (context, "Maximum stock reached" ),
124
127
style: EdgeAlertStyle .WARNING ,
125
128
icon: Icons .shopping_cart,
126
129
);
@@ -187,8 +190,10 @@ class _CartPageState extends State<CartPage> {
187
190
splashColor: Colors .transparent,
188
191
child: Align (
189
192
child: Padding (
190
- child: Text (trans (context, "Clear Cart" ),
191
- style: Theme .of (context).primaryTextTheme.bodyText1),
193
+ child: Text (
194
+ trans (context, "Clear Cart" ),
195
+ style: Theme .of (context).primaryTextTheme.bodyText1,
196
+ ),
192
197
padding: EdgeInsets .only (right: 8 ),
193
198
),
194
199
alignment: Alignment .centerLeft,
@@ -217,10 +222,11 @@ class _CartPageState extends State<CartPage> {
217
222
color: Colors .black45,
218
223
),
219
224
Padding (
220
- child: Text (trans (context, "Empty Basket" ),
221
- style: Theme .of (context)
222
- .primaryTextTheme
223
- .bodyText2),
225
+ child: Text (
226
+ trans (context, "Empty Basket" ),
227
+ style:
228
+ Theme .of (context).primaryTextTheme.bodyText2,
229
+ ),
224
230
padding: EdgeInsets .only (top: 10 ),
225
231
)
226
232
],
@@ -266,9 +272,11 @@ class _CartPageState extends State<CartPage> {
266
272
return Text ("" );
267
273
else
268
274
return new Padding (
269
- child: wsRow2Text (context,
270
- text1: trans (context, "Total" ),
271
- text2: (_isLoading ? "" : snapshot.data)),
275
+ child: wsRow2Text (
276
+ context,
277
+ text1: trans (context, "Total" ),
278
+ text2: (_isLoading ? "" : snapshot.data),
279
+ ),
272
280
padding: EdgeInsets .only (bottom: 15 , top: 15 ),
273
281
);
274
282
}
0 commit comments