-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVeg_newPage.dart
55 lines (36 loc) · 1.27 KB
/
Veg_newPage.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import 'dart:math';
import 'package:flutter/material.dart';
import 'main.dart';
import 'package:trialcomponents/cart.dart';
import 'package:trialcomponents/veg.dart';
class Veg_newPage extends StatefulWidget {
final product ;
final pic;
final price;
const Veg_newPage({Key key, this.product, this.pic, this.price}) : super(key: key);
@override
_Veg_newPageState createState() => _Veg_newPageState();
}
class _Veg_newPageState extends State<Veg_newPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(title: Text('View Products'),backgroundColor:Colors.lightGreen,
actions: <Widget>[new IconButton(icon: Icon(Icons.shopping_cart),color:Colors.pink,
onPressed:(){Navigator.pushNamed(context,'/cart');},
)],),
body:GridTile(
child:widget.pic,
footer: Container(
child:Column(
children: <Widget>[
Text(widget.product,style: TextStyle(fontSize: 32.0),),
Text(widget.price,style: TextStyle(fontSize: 30.0,color:Colors.red),),
}),
],
),
),
),
);
}
}