diff --git a/lib/views/main/customer/customer_bottomNav.dart b/lib/views/main/customer/customer_bottomNav.dart index fb7e4b9..85287b0 100644 --- a/lib/views/main/customer/customer_bottomNav.dart +++ b/lib/views/main/customer/customer_bottomNav.dart @@ -7,7 +7,7 @@ import 'favorites.dart'; import 'home.dart'; import 'profile.dart'; import 'category.dart'; -import 'shop.dart'; +import '../store/store.dart'; class CustomerBottomNav extends StatefulWidget { static const routeName = '/customer-home'; @@ -24,7 +24,7 @@ class _CustomerBottomNavState extends State { HomeScreen(), FavoriteScreen(), CategoryScreen(), - ShopScreen(), + StoreScreen(), CartScreen(), ProfileScreen(), ]; diff --git a/lib/views/main/customer/shop.dart b/lib/views/main/customer/shop.dart deleted file mode 100644 index 1ece2b2..0000000 --- a/lib/views/main/customer/shop.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; - -class ShopScreen extends StatefulWidget { - const ShopScreen({Key? key}) : super(key: key); - - @override - State createState() => _ShopScreenState(); -} - -class _ShopScreenState extends State { - @override - Widget build(BuildContext context) { - return Container(child: Center(child:Text('Shop Screen'))); - } -} diff --git a/lib/views/main/seller/seller_bottomNav.dart b/lib/views/main/seller/seller_bottomNav.dart index b6c7951..2a722e2 100644 --- a/lib/views/main/seller/seller_bottomNav.dart +++ b/lib/views/main/seller/seller_bottomNav.dart @@ -6,7 +6,7 @@ import 'dashboard.dart'; import 'home.dart'; import 'profile.dart'; import 'category.dart'; -import 'store.dart'; +import '../store/store.dart'; class SellerBottomNav extends StatefulWidget { static const routeName = '/seller-home'; diff --git a/lib/views/main/seller/store.dart b/lib/views/main/store/store.dart similarity index 93% rename from lib/views/main/seller/store.dart rename to lib/views/main/store/store.dart index ed508d9..914b79a 100644 --- a/lib/views/main/seller/store.dart +++ b/lib/views/main/store/store.dart @@ -1,5 +1,6 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; +import 'package:multivendor_shop/views/main/store/store_details.dart'; import '../../../components/loading.dart'; import '../../../constants/colors.dart'; @@ -40,7 +41,7 @@ class _StoreScreenState extends State { ], ), ), - const SizedBox(height:10), + const SizedBox(height: 10), SizedBox( height: size.height / 1.25, child: StreamBuilder( @@ -92,13 +93,13 @@ class _StoreScreenState extends State { return Padding( padding: const EdgeInsets.symmetric(horizontal: 10.0), child: GestureDetector( - // onTap: () => Navigator.of(context).push( - // MaterialPageRoute( - // builder: (context) => DetailsScreen( - // product: data, - // ), - // ), - // ), + onTap: () => Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => StoreDetails( + store: data, + ), + ), + ), child: Container( padding: const EdgeInsets.all(2), decoration: BoxDecoration( diff --git a/lib/views/main/store/store_details.dart b/lib/views/main/store/store_details.dart new file mode 100644 index 0000000..c82cc6f --- /dev/null +++ b/lib/views/main/store/store_details.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; + +import '../../../constants/colors.dart'; + +class StoreDetails extends StatefulWidget { + const StoreDetails({ + Key? key, + required this.store, + }) : super(key: key); + final dynamic store; + + @override + State createState() => _StoreDetailsState(); +} + +class _StoreDetailsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + extendBodyBehindAppBar: true, + appBar: AppBar( + elevation: 0, + backgroundColor: Colors.transparent, + automaticallyImplyLeading: false, + leading: Builder(builder: (context) { + return GestureDetector( + onTap: () => Navigator.of(context).pop(), + child: const Icon( + Icons.chevron_left, + size: 35, + color: primaryColor, + ), + ); + }), + ), + ); + } +}