mirror of
https://github.com/SoPat712/RUSwipeShare.git
synced 2025-08-22 03:18:44 -04:00
Merge branch 'master' of https://github.com/SoPat712/RUSwipeShare
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutterfire_ui/auth.dart';
|
import 'package:flutterfire_ui/auth.dart';
|
||||||
import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
|
import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
|
||||||
|
import 'package:ruswipeshare/sell.dart';
|
||||||
import 'profile_screen_custom.dart';
|
import 'profile_screen_custom.dart';
|
||||||
import 'main_screen.dart';
|
import 'main_screen.dart';
|
||||||
|
|
||||||
@@ -21,13 +22,18 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
|
|
||||||
List<Widget> _buildScreens() => [
|
List<Widget> _buildScreens() => [
|
||||||
const MainScreen(),
|
const MainScreen(),
|
||||||
const MainScreen(),
|
const SellScreen(),
|
||||||
const ProfileScreenCustom(),
|
const ProfileScreenCustom(),
|
||||||
const MainScreen(),
|
const MainScreen(),
|
||||||
];
|
];
|
||||||
|
|
||||||
List<PersistentBottomNavBarItem> _navBarsItems() => [
|
List<PersistentBottomNavBarItem> _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(
|
PersistentBottomNavBarItem(
|
||||||
icon: const Icon(Icons.attach_money),
|
icon: const Icon(Icons.attach_money),
|
||||||
title: "Sell",
|
title: "Sell",
|
||||||
@@ -67,9 +73,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
confineInSafeArea: true,
|
confineInSafeArea: true,
|
||||||
backgroundColor: Colors.white, // Default is Colors.white.
|
backgroundColor: Colors.white, // Default is Colors.white.
|
||||||
handleAndroidBackButtonPress: true, // Default is true.
|
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.
|
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(
|
decoration: NavBarDecoration(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
colorBehindNavBar: Colors.white,
|
colorBehindNavBar: Colors.white,
|
||||||
@@ -87,7 +95,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
curve: Curves.ease,
|
curve: Curves.ease,
|
||||||
duration: Duration(milliseconds: 200),
|
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.
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,25 +5,25 @@ import 'firebase_options.dart';
|
|||||||
import 'auth_gate.dart';
|
import 'auth_gate.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||||
|
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
|
const MyApp({super.key});
|
||||||
const MyApp({super.key});
|
@override
|
||||||
@override
|
Widget build(BuildContext context) {
|
||||||
Widget build(BuildContext context) {
|
return MaterialApp(
|
||||||
return MaterialApp(
|
theme: ThemeData(
|
||||||
theme: ThemeData(
|
primarySwatch: CustomMaterialColor(200, 61, 61).mdColor,
|
||||||
primarySwatch: CustomMaterialColor(200,61,61).mdColor,
|
),
|
||||||
),
|
home: const AuthGate(),
|
||||||
home: const AuthGate(),
|
);
|
||||||
);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CustomMaterialColor {
|
class CustomMaterialColor {
|
||||||
final int r;
|
final int r;
|
||||||
final int g;
|
final int g;
|
||||||
|
37
lib/sell.dart
Normal file
37
lib/sell.dart
Normal file
@@ -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<SellScreen> {
|
||||||
|
@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'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user