From 69badc11c24cd5ee4f25a1bb7f0f5aa63a77f6fc Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 15 May 2022 22:08:20 +0700 Subject: [PATCH] Add product detail to new arrival --- lib/components/new_arrival_products.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/components/new_arrival_products.dart b/lib/components/new_arrival_products.dart index a144095..e9d0765 100644 --- a/lib/components/new_arrival_products.dart +++ b/lib/components/new_arrival_products.dart @@ -4,6 +4,7 @@ import '../utils/utils.dart'; import 'product_card.dart'; import 'section_title.dart'; import 'package:nekoya_flutter/api/api.dart'; +import 'package:nekoya_flutter/components/product_detail.dart'; class NewArrivalProducts extends StatelessWidget { const NewArrivalProducts({ @@ -42,7 +43,14 @@ class NewArrivalProducts extends StatelessWidget { imageUrl: "https://nekoya.moe.team/img/${data[index]['IMAGE']}", price: 99, bgColor: const Color(0xFFFEFBF9), - press: () {}, + press: () { + showModalBottomSheet( + isScrollControlled: true, + backgroundColor: Colors.transparent, + context: context, + builder: (context) => productDetail(context, data[index]['ID']), + ); + }, ), ), ),