diff --git a/lib/screens/home_screens/home_screen.dart b/lib/screens/home_screens/home_screen.dart index 1ed599a4ddac70229ee8a13b685429a28cfc41b1..30b189fd2af429b621efc78f41dbac1f01540550 100644 --- a/lib/screens/home_screens/home_screen.dart +++ b/lib/screens/home_screens/home_screen.dart @@ -28,19 +28,48 @@ class HomeScreen extends StatelessWidget { children: [ SingleProduct( onTap: () { - Navigator.of(context).push(MaterialPageRoute( - builder: (context) => ProductOverview())); + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Fresh Basil", + productImage: + 'https://www.pngitem.com/pimgs/m/490-4903879_fresh-basil-leaf-png-transparent-png.png', + ), + ), + ); }, productImage: 'https://www.pngitem.com/pimgs/m/490-4903879_fresh-basil-leaf-png-transparent-png.png', productName: "Fresh Basil", ), SingleProduct( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Fresh Mint", + productImage: + 'https://i.dlpng.com/static/png/5560435-peppermint-transparent-image-png-arts-peppermint-png-1200_900_preview.png', + ), + ), + ); + }, productImage: 'https://i.dlpng.com/static/png/5560435-peppermint-transparent-image-png-arts-peppermint-png-1200_900_preview.png', productName: "Fresh Mint", ), SingleProduct( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Rose Mary", + productImage: + 'https://www.pngarts.com/files/5/Rosemary-PNG-Transparent-Image.png', + ), + ), + ); + }, productImage: 'https://www.pngarts.com/files/5/Rosemary-PNG-Transparent-Image.png', productName: "Rose Mary", @@ -75,19 +104,48 @@ class HomeScreen extends StatelessWidget { children: [ SingleProduct( onTap: () { - Navigator.of(context).push(MaterialPageRoute( - builder: (context) => ProductOverview())); + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Fresh Berries", + productImage: + 'https://www.kindpng.com/picc/m/191-1916425_berries-png-file-download-free-mixed-berries-fruit.png', + ), + ), + ); }, productImage: 'https://www.kindpng.com/picc/m/191-1916425_berries-png-file-download-free-mixed-berries-fruit.png', productName: "Fresh Berries", ), SingleProduct( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Watermelon", + productImage: + 'https://e1.pngegg.com/pngimages/832/291/png-clipart-fruit-sliced-watermelon.png', + ), + ), + ); + }, productImage: 'https://e1.pngegg.com/pngimages/832/291/png-clipart-fruit-sliced-watermelon.png', productName: "Watermelon", ), SingleProduct( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Mangoes", + productImage: + 'https://www.nicepng.com/png/detail/852-8528360_mango-png-image-mango-clipart-fruit.png', + ), + ), + ); + }, productImage: 'https://www.nicepng.com/png/detail/852-8528360_mango-png-image-mango-clipart-fruit.png', productName: "Mangoes", @@ -122,19 +180,48 @@ class HomeScreen extends StatelessWidget { children: [ SingleProduct( onTap: () { - Navigator.of(context).push(MaterialPageRoute( - builder: (context) => ProductOverview())); + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Fennel", + productImage: + 'https://www.fondation-louisbonduelle.org/wp-content/uploads/2016/09/fenouil_262755635-e1475226317736.png', + ), + ), + ); }, productImage: 'https://www.fondation-louisbonduelle.org/wp-content/uploads/2016/09/fenouil_262755635-e1475226317736.png', productName: "Fennel", ), SingleProduct( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Beet Root", + productImage: + 'https://www.nicepng.com/png/detail/50-508075_free-png-beet-png-images-transparent-red-beetroot.png', + ), + ), + ); + }, productImage: 'https://www.nicepng.com/png/detail/50-508075_free-png-beet-png-images-transparent-red-beetroot.png', productName: "Beet Root", ), SingleProduct( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ProductOverview( + productName: "Turnip", + productImage: + 'https://purepng.com/public/uploads/large/purepng.com-turnipvegetables-root-vegetable-rutabaga-swede-turnip-neep-941524702928b62ft.png', + ), + ), + ); + }, productImage: 'https://purepng.com/public/uploads/large/purepng.com-turnipvegetables-root-vegetable-rutabaga-swede-turnip-neep-941524702928b62ft.png', productName: "Turnip", diff --git a/lib/screens/home_screens/product_overview/product_overview.dart b/lib/screens/home_screens/product_overview/product_overview.dart index 525acc21286c9b84215eade503a39fa49235cfc4..76b96b71ce2f8e14fd8d5ae53ff70bfe56598ce0 100644 --- a/lib/screens/home_screens/product_overview/product_overview.dart +++ b/lib/screens/home_screens/product_overview/product_overview.dart @@ -4,6 +4,10 @@ import 'package:food_app/config/colors.dart'; enum SigninCharacter { fill, outline } class ProductOverview extends StatefulWidget { + final String productName; + final String productImage; + ProductOverview({this.productImage, this.productName}); + @override _ProductOverviewState createState() => _ProductOverviewState(); } @@ -74,14 +78,13 @@ class _ProductOverviewState extends State<ProductOverview> { child: Column( children: [ ListTile( - title: Text("Fresh Basil"), + title: Text(widget.productName), subtitle: Text("\$50"), ), Container( height: 250, padding: EdgeInsets.all(40), - child: Image.network( - "https://www.pngitem.com/pimgs/m/490-4903879_fresh-basil-leaf-png-transparent-png.png"), + child: Image.network(widget.productImage ?? ""), ), Container( padding: EdgeInsets.symmetric(horizontal: 20),