Skip to content

Commit

Permalink
fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ManavSarkar committed Dec 19, 2021
1 parent 429ff2a commit 0098bab
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions lib/Screens/product_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:test_app/provider/user.dart';

import 'package:uuid/uuid.dart';
import 'package:test_app/services/order.dart';
import 'package:test_app/model/cart_item.dart';

class ProductDetails extends StatefulWidget {
final ProductModel product;
Expand Down Expand Up @@ -121,7 +120,6 @@ class _ProductDetailsState extends State<ProductDetails> {
appProvider.changeIsLoading();
return;
}
appProvider.changeIsLoading();
},
color: Colors.red,
),
Expand All @@ -137,7 +135,7 @@ class _ProductDetailsState extends State<ProductDetails> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Expanded(
child: ProdPrice(),
child: prodPrice(),
),
),
Expanded(
Expand Down Expand Up @@ -198,7 +196,7 @@ class _ProductDetailsState extends State<ProductDetails> {
],
),
onPressed: () {
double pricef = ProdPriceM();
double pricef = prodPriceM();
showDialog(
context: context,
builder: (BuildContext context) {
Expand All @@ -215,12 +213,12 @@ class _ProductDetailsState extends State<ProductDetails> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'You will be charged ${pricef} upon delivery!',
'You will be charged $pricef upon delivery!',
textAlign: TextAlign.center,
),
SizedBox(
width: 320.0,
child: RaisedButton(
child: ElevatedButton(
onPressed: () async {
var uuid = Uuid();
String id = uuid.v4();
Expand Down Expand Up @@ -252,21 +250,25 @@ class _ProductDetailsState extends State<ProductDetails> {
"Accept",
style: TextStyle(color: Colors.white),
),
color: const Color(0xFF1BC0C5),
style: ElevatedButton.styleFrom(
primary: const Color(0xFF1BC0C5),
),
),
),
SizedBox(
width: 320.0,
child: RaisedButton(
onPressed: () {
Navigator.pop(context);
},
child: Text(
"Reject",
style:
TextStyle(color: Colors.white),
),
color: Colors.red),
child: ElevatedButton(
onPressed: () {
Navigator.pop(context);
},
child: Text(
"Reject",
style: TextStyle(color: Colors.white),
),
style: ElevatedButton.styleFrom(
primary: Colors.red,
),
),
) //}
],
),
Expand Down Expand Up @@ -364,7 +366,6 @@ class _ProductDetailsState extends State<ProductDetails> {
appProvider.changeIsLoading();
return;
}
appProvider.changeIsLoading();
},
),
],
Expand Down Expand Up @@ -434,7 +435,7 @@ class _ProductDetailsState extends State<ProductDetails> {
);
}

ProdPrice() {
Widget prodPrice() {
TextStyle productPriceTextStyle =
TextStyle(color: Colors.black, fontSize: 24);
switch (size) {
Expand Down Expand Up @@ -467,7 +468,7 @@ class _ProductDetailsState extends State<ProductDetails> {
}
}

ProdPriceM() {
prodPriceM() {
switch (size) {
case '1 week':
return widget.product.prices[0];
Expand Down

0 comments on commit 0098bab

Please sign in to comment.