Skip to content

Commit

Permalink
task: store and details
Browse files Browse the repository at this point in the history
  • Loading branch information
Atuoha committed Oct 7, 2022
1 parent 42b3947 commit 97cae9c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 26 deletions.
4 changes: 2 additions & 2 deletions lib/views/main/customer/customer_bottomNav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -24,7 +24,7 @@ class _CustomerBottomNavState extends State<CustomerBottomNav> {
HomeScreen(),
FavoriteScreen(),
CategoryScreen(),
ShopScreen(),
StoreScreen(),
CartScreen(),
ProfileScreen(),
];
Expand Down
15 changes: 0 additions & 15 deletions lib/views/main/customer/shop.dart

This file was deleted.

2 changes: 1 addition & 1 deletion lib/views/main/seller/seller_bottomNav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -40,7 +41,7 @@ class _StoreScreenState extends State<StoreScreen> {
],
),
),
const SizedBox(height:10),
const SizedBox(height: 10),
SizedBox(
height: size.height / 1.25,
child: StreamBuilder<QuerySnapshot>(
Expand Down Expand Up @@ -92,13 +93,13 @@ class _StoreScreenState extends State<StoreScreen> {
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(
Expand Down
38 changes: 38 additions & 0 deletions lib/views/main/store/store_details.dart
Original file line number Diff line number Diff line change
@@ -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<StoreDetails> createState() => _StoreDetailsState();
}

class _StoreDetailsState extends State<StoreDetails> {
@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,
),
);
}),
),
);
}
}

0 comments on commit 97cae9c

Please sign in to comment.