Skip to content

Commit 0098bab

Browse files
committed
fixed lint errors
1 parent 429ff2a commit 0098bab

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

lib/Screens/product_details.dart

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:test_app/provider/user.dart';
1010

1111
import 'package:uuid/uuid.dart';
1212
import 'package:test_app/services/order.dart';
13-
import 'package:test_app/model/cart_item.dart';
1413

1514
class ProductDetails extends StatefulWidget {
1615
final ProductModel product;
@@ -121,7 +120,6 @@ class _ProductDetailsState extends State<ProductDetails> {
121120
appProvider.changeIsLoading();
122121
return;
123122
}
124-
appProvider.changeIsLoading();
125123
},
126124
color: Colors.red,
127125
),
@@ -137,7 +135,7 @@ class _ProductDetailsState extends State<ProductDetails> {
137135
Padding(
138136
padding: const EdgeInsets.symmetric(horizontal: 8.0),
139137
child: Expanded(
140-
child: ProdPrice(),
138+
child: prodPrice(),
141139
),
142140
),
143141
Expanded(
@@ -198,7 +196,7 @@ class _ProductDetailsState extends State<ProductDetails> {
198196
],
199197
),
200198
onPressed: () {
201-
double pricef = ProdPriceM();
199+
double pricef = prodPriceM();
202200
showDialog(
203201
context: context,
204202
builder: (BuildContext context) {
@@ -215,12 +213,12 @@ class _ProductDetailsState extends State<ProductDetails> {
215213
crossAxisAlignment: CrossAxisAlignment.start,
216214
children: [
217215
Text(
218-
'You will be charged ${pricef} upon delivery!',
216+
'You will be charged $pricef upon delivery!',
219217
textAlign: TextAlign.center,
220218
),
221219
SizedBox(
222220
width: 320.0,
223-
child: RaisedButton(
221+
child: ElevatedButton(
224222
onPressed: () async {
225223
var uuid = Uuid();
226224
String id = uuid.v4();
@@ -252,21 +250,25 @@ class _ProductDetailsState extends State<ProductDetails> {
252250
"Accept",
253251
style: TextStyle(color: Colors.white),
254252
),
255-
color: const Color(0xFF1BC0C5),
253+
style: ElevatedButton.styleFrom(
254+
primary: const Color(0xFF1BC0C5),
255+
),
256256
),
257257
),
258258
SizedBox(
259259
width: 320.0,
260-
child: RaisedButton(
261-
onPressed: () {
262-
Navigator.pop(context);
263-
},
264-
child: Text(
265-
"Reject",
266-
style:
267-
TextStyle(color: Colors.white),
268-
),
269-
color: Colors.red),
260+
child: ElevatedButton(
261+
onPressed: () {
262+
Navigator.pop(context);
263+
},
264+
child: Text(
265+
"Reject",
266+
style: TextStyle(color: Colors.white),
267+
),
268+
style: ElevatedButton.styleFrom(
269+
primary: Colors.red,
270+
),
271+
),
270272
) //}
271273
],
272274
),
@@ -364,7 +366,6 @@ class _ProductDetailsState extends State<ProductDetails> {
364366
appProvider.changeIsLoading();
365367
return;
366368
}
367-
appProvider.changeIsLoading();
368369
},
369370
),
370371
],
@@ -434,7 +435,7 @@ class _ProductDetailsState extends State<ProductDetails> {
434435
);
435436
}
436437

437-
ProdPrice() {
438+
Widget prodPrice() {
438439
TextStyle productPriceTextStyle =
439440
TextStyle(color: Colors.black, fontSize: 24);
440441
switch (size) {
@@ -467,7 +468,7 @@ class _ProductDetailsState extends State<ProductDetails> {
467468
}
468469
}
469470

470-
ProdPriceM() {
471+
prodPriceM() {
471472
switch (size) {
472473
case '1 week':
473474
return widget.product.prices[0];

0 commit comments

Comments
 (0)