register step screen, otp screen, register screen
This commit is contained in:
@@ -22,6 +22,9 @@ class RouteName {
|
||||
//choose country
|
||||
static const String chooseCountryScreen = 'chooseCountryScreen';
|
||||
|
||||
//
|
||||
static const String mainScreen = 'mainScreen';
|
||||
|
||||
//Biometric
|
||||
static const String biometricScreen = 'biometricScreen';
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tanami_app/core/routes/route_name.dart';
|
||||
import 'package:tanami_app/features/MainScreens/MainScreen.dart';
|
||||
import 'package:tanami_app/features/biometric/presentation/pages/biometric_screen.dart';
|
||||
import 'package:tanami_app/features/countrySelection/presentation/pages/choose_country_screen.dart';
|
||||
import 'package:tanami_app/features/otpVerification/presentation/pages/otp_screen.dart';
|
||||
@@ -60,6 +61,13 @@ final goRouter = GoRouter(
|
||||
return const ChooseCountryScreen();
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: RouteName.mainScreen,
|
||||
path: RouteName.mainScreen,
|
||||
builder: (context, state) {
|
||||
return const MainScreen();
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: RouteName.biometricScreen,
|
||||
path: RouteName.biometricScreen,
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AcademyScreen extends StatefulWidget {
|
||||
const AcademyScreen({super.key});
|
||||
|
||||
@override
|
||||
State<AcademyScreen> createState() => _AcademyScreenState();
|
||||
}
|
||||
|
||||
class _AcademyScreenState extends State<AcademyScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(body: Text('Academy'),);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InvestScreen extends StatefulWidget {
|
||||
const InvestScreen({super.key});
|
||||
|
||||
@override
|
||||
State<InvestScreen> createState() => _InvestScreenState();
|
||||
}
|
||||
|
||||
class _InvestScreenState extends State<InvestScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(body: Text('Invest'),);
|
||||
}
|
||||
}
|
||||
32
lib/features/MainScreens/MainScreen.dart
Normal file
32
lib/features/MainScreens/MainScreen.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tanami_app/features/MainScreens/Academy/presentation/pages/academyScreen.dart';
|
||||
import 'package:tanami_app/features/MainScreens/Invest/presentation/pages/investScreen.dart';
|
||||
import 'package:tanami_app/features/MainScreens/Portfolio/presentation/pages/portfolioScreen.dart';
|
||||
import 'package:tanami_app/features/MainScreens/Settings/presentation/pages/settingsScreen.dart';
|
||||
import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/walletScreen.dart';
|
||||
import 'package:tanami_app/shared/components/common_bottom_navigation.dart';
|
||||
|
||||
var currentTab = [
|
||||
const WalletScreen(),
|
||||
const PortfolioScreen(),
|
||||
const InvestScreen(),
|
||||
const AcademyScreen(),
|
||||
const SettingsScreen(),
|
||||
];
|
||||
|
||||
var selectedIndex = 1;
|
||||
|
||||
void updateTab(int index) {
|
||||
selectedIndex = index;
|
||||
}
|
||||
|
||||
class MainScreen extends StatelessWidget {
|
||||
const MainScreen({super.key});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: currentTab[selectedIndex],
|
||||
bottomNavigationBar: bottomnavigationbar(selectedIndex),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PortfolioScreen extends StatefulWidget {
|
||||
const PortfolioScreen({super.key});
|
||||
|
||||
@override
|
||||
State<PortfolioScreen> createState() => _PortfolioScreenState();
|
||||
}
|
||||
|
||||
class _PortfolioScreenState extends State<PortfolioScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(body: Text('Portfolio'),);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SettingsScreen extends StatefulWidget {
|
||||
const SettingsScreen({super.key});
|
||||
|
||||
@override
|
||||
State<SettingsScreen> createState() => _SettingsScreenState();
|
||||
}
|
||||
|
||||
class _SettingsScreenState extends State<SettingsScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Text('Settings'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WalletScreen extends StatefulWidget {
|
||||
const WalletScreen({super.key});
|
||||
|
||||
@override
|
||||
State<WalletScreen> createState() => _WalletScreenState();
|
||||
}
|
||||
|
||||
class _WalletScreenState extends State<WalletScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(body: Text('Wallet'),);
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@ class BottomSection extends StatelessWidget {
|
||||
if (state is LoginLoading) {
|
||||
Loader.loader(context);
|
||||
} else if (state is LoginSuccess) {
|
||||
goRouter.goNamed('mainScreen');
|
||||
successToastMessage(context, "login successful !");
|
||||
goRouter.pop();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ Widget buildOnboardingPage(
|
||||
clr: AppColor.darkGreyColor,
|
||||
),
|
||||
),
|
||||
const Gap(40),
|
||||
const Gap(30),
|
||||
welcomeIndicator(pageController),
|
||||
if (isLastPage) const LoginSignUpButton(),
|
||||
],
|
||||
|
||||
97
lib/shared/components/common_bottom_navigation.dart
Normal file
97
lib/shared/components/common_bottom_navigation.dart
Normal file
@@ -0,0 +1,97 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:tanami_app/features/MainScreens/MainScreen.dart';
|
||||
|
||||
Widget bottomnavigationbar(selectedIndex) {
|
||||
return BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
showUnselectedLabels: true,
|
||||
selectedItemColor: Color(0xFF0B8933),
|
||||
unselectedItemColor: const Color(0xFF676767),
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(0xFF676767),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino',
|
||||
),
|
||||
selectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(0xFF0B8933),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino',
|
||||
),
|
||||
currentIndex: selectedIndex,
|
||||
onTap: (index) {
|
||||
updateTab(index);
|
||||
},
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/wallet.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/wallet.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Wallet',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/portfolio.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/portfolio.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Portfolio',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/invest.png',
|
||||
height: 24.h,
|
||||
width: 24.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/invest.png',
|
||||
height: 28.h,
|
||||
width: 28.w,
|
||||
),
|
||||
|
||||
// SvgPicture.asset('assets/image/svg/active_shortTrade.svg'),
|
||||
label: 'Invest',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/academy.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/academy.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Academy',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/settings.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/settings.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Settings',
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user