diff --git a/lib/home.dart b/lib/home.dart index c84bda9..90c4dd4 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart'; +import 'package:ruswipeshare/sell.dart'; import 'profile_screen_custom.dart'; import 'main_screen.dart'; @@ -20,13 +21,18 @@ class _HomeScreenState extends State { List _buildScreens() => [ const MainScreen(), - const MainScreen(), + const SellScreen(), const ProfileScreenCustom(), const MainScreen(), ]; List _navBarsItems() => [ - PersistentBottomNavBarItem(icon: const Icon(Icons.shopping_cart), title: "Buy", activeColorPrimary: Colors.blue, inactiveColorPrimary: Colors.grey, inactiveColorSecondary: Colors.purple), + PersistentBottomNavBarItem( + icon: const Icon(Icons.shopping_cart), + title: "Buy", + activeColorPrimary: Colors.blue, + inactiveColorPrimary: Colors.grey, + inactiveColorSecondary: Colors.purple), PersistentBottomNavBarItem( icon: const Icon(Icons.attach_money), title: "Sell", @@ -66,9 +72,11 @@ class _HomeScreenState extends State { confineInSafeArea: true, backgroundColor: Colors.white, // Default is Colors.white. handleAndroidBackButtonPress: true, // Default is true. - resizeToAvoidBottomInset: true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true. + resizeToAvoidBottomInset: + true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true. stateManagement: true, // Default is true. - hideNavigationBarWhenKeyboardShows: true, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true. + hideNavigationBarWhenKeyboardShows: + true, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true. decoration: NavBarDecoration( borderRadius: BorderRadius.circular(10.0), colorBehindNavBar: Colors.white, @@ -86,7 +94,8 @@ class _HomeScreenState extends State { curve: Curves.ease, duration: Duration(milliseconds: 200), ), - navBarStyle: NavBarStyle.style13, // Choose the nav bar style with this property. + navBarStyle: + NavBarStyle.style13, // Choose the nav bar style with this property. ); } } diff --git a/lib/main.dart b/lib/main.dart index 9b07f7b..cb31596 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,25 +5,25 @@ import 'firebase_options.dart'; import 'auth_gate.dart'; void main() async { - WidgetsFlutterBinding.ensureInitialized(); + WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); runApp(const MyApp()); } class MyApp extends StatelessWidget { - - const MyApp({super.key}); - @override - Widget build(BuildContext context) { - return MaterialApp( - theme: ThemeData( - primarySwatch: CustomMaterialColor(200,61,61).mdColor, - ), - home: const AuthGate(), - ); - } + const MyApp({super.key}); + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData( + primarySwatch: CustomMaterialColor(200, 61, 61).mdColor, + ), + home: const AuthGate(), + ); + } } + class CustomMaterialColor { final int r; final int g; @@ -46,4 +46,4 @@ class CustomMaterialColor { }; return MaterialColor(Color.fromRGBO(r, g, b, 1).value, color); } -} \ No newline at end of file +} diff --git a/lib/sell.dart b/lib/sell.dart new file mode 100644 index 0000000..03211d7 --- /dev/null +++ b/lib/sell.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; + +class SellScreen extends StatefulWidget { + const SellScreen({Key? key}) : super(key: key); + + @override + _SellScreenState createState() => _SellScreenState(); +} + +class _SellScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Sell'), + automaticallyImplyLeading: false, + ), + body: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.store_mall_directory, color: Colors.red), + Expanded( + child: const Text('Place'), + ), + Icon(Icons.access_time, color: Colors.red), + Expanded( + child: const Text('Time'), + ), + Icon(Icons.attach_money, color: Colors.red), + Expanded( + child: const Text('Cost'), + ), + ], + ), + ); + } +}