diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index f9f93ce..aad012a 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -33,7 +33,8 @@ class MyApp extends StatelessWidget { child: MaterialApp( title: 'Fresh Plaza', theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue), + colorScheme: ColorScheme.fromSeed( + seedColor: const Color.fromARGB(255, 149, 92, 255)), scaffoldBackgroundColor: const Color(0xFFFAFAFF), textTheme: const TextTheme( headlineLarge: TextStyle(color: Color(0xFF000000), fontSize: 64), diff --git a/mobile/lib/pages/dashboard.dart b/mobile/lib/pages/dashboard.dart index bf27e57..d92cccd 100644 --- a/mobile/lib/pages/dashboard.dart +++ b/mobile/lib/pages/dashboard.dart @@ -2,12 +2,14 @@ import 'package:flutter/material.dart'; import 'package:mobile/pages/all_products_page.dart'; import 'package:mobile/pages/cart_page.dart'; import 'package:mobile/pages/all_receipts_page.dart'; +import 'package:mobile/pages/home_page.dart'; import 'package:mobile/repos/bottom_navigation_bar.dart'; import 'package:mobile/repos/cart.dart'; import 'package:provider/provider.dart'; class Dashboard extends StatelessWidget { final List pages = [ + const HomePage(), const AllProductsPage(), const CartPage(), const AllReceiptsPage(), @@ -23,6 +25,7 @@ class Dashboard extends StatelessWidget { return Scaffold( bottomNavigationBar: BottomNavigationBar( + type: BottomNavigationBarType.fixed, onTap: (index) => pageIndexProvider.setIndex(index), currentIndex: currentIndex, items: [ @@ -30,15 +33,24 @@ class Dashboard extends StatelessWidget { icon: Icon(currentIndex == 0 ? Icons.home : Icons.home_outlined), label: "Home"), BottomNavigationBarItem( - icon: Badge.count( - count: cartRepo.totalItemsInCart(), - child: Icon(currentIndex == 1 - ? Icons.shopping_cart - : Icons.shopping_cart_outlined), - ), + icon: Icon( + currentIndex == 1 ? Icons.search : Icons.search_outlined), + label: "Products"), + BottomNavigationBarItem( + icon: cartRepo.totalItemsInCart() == 0 + ? Icon(currentIndex == 2 + ? Icons.shopping_cart + : Icons.shopping_cart_outlined) + : Badge.count( + backgroundColor: Theme.of(context).primaryColor, + count: cartRepo.totalItemsInCart(), + child: Icon(currentIndex == 2 + ? Icons.shopping_cart + : Icons.shopping_cart_outlined), + ), label: "Cart"), BottomNavigationBarItem( - icon: Icon(currentIndex == 2 + icon: Icon(currentIndex == 3 ? Icons.receipt_long : Icons.receipt_long_outlined), label: "Receipts") diff --git a/mobile/lib/pages/finish_shopping_page.dart b/mobile/lib/pages/finish_shopping_page.dart index 9466bd4..6c3ed6c 100644 --- a/mobile/lib/pages/finish_shopping_page.dart +++ b/mobile/lib/pages/finish_shopping_page.dart @@ -83,12 +83,12 @@ class FinishShoppingPage extends StatelessWidget { color: Colors.white, ), padding: const EdgeInsets.all(20), - child: const SizedBox( + child: SizedBox( width: 50, height: 50, child: CircularProgressIndicator( - valueColor: - AlwaysStoppedAnimation(Colors.blue), + valueColor: AlwaysStoppedAnimation( + Theme.of(context).primaryColor), strokeWidth: 6.0, ), ), @@ -101,9 +101,9 @@ class FinishShoppingPage extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(10)), color: Colors.white, ), - child: const Icon( + child: Icon( Icons.check_rounded, - color: Colors.blue, + color: Theme.of(context).primaryColor, size: 70, ), ) diff --git a/mobile/lib/pages/home_page.dart b/mobile/lib/pages/home_page.dart new file mode 100644 index 0000000..519735d --- /dev/null +++ b/mobile/lib/pages/home_page.dart @@ -0,0 +1,10 @@ +import 'package:flutter/material.dart'; + +class HomePage extends StatelessWidget { + const HomePage({super.key}); + + @override + Widget build(BuildContext context) { + return const Column(); + } +} diff --git a/mobile/lib/widgets/primary_button.dart b/mobile/lib/widgets/primary_button.dart index 8a344ac..ddb680b 100644 --- a/mobile/lib/widgets/primary_button.dart +++ b/mobile/lib/widgets/primary_button.dart @@ -15,7 +15,8 @@ class PrimaryButton extends StatelessWidget { return TextButton( onPressed: onPressed, style: TextButton.styleFrom( - backgroundColor: Colors.blue, foregroundColor: Colors.white), + backgroundColor: Theme.of(context).primaryColor, + foregroundColor: Colors.white), child: child); } }