2024-05-30 13:56:20 +05:30
|
|
|
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';
|
2024-06-04 17:56:52 +05:30
|
|
|
import 'package:tanami_app/features/MainScreens/Portfolio/presentation/pages/portfolio_screen.dart';
|
2024-05-30 13:56:20 +05:30
|
|
|
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';
|
|
|
|
|
|
2024-06-03 19:10:05 +05:30
|
|
|
import '../../shared/components/exit_app_dialog.dart';
|
|
|
|
|
|
2024-05-30 13:56:20 +05:30
|
|
|
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) {
|
2024-06-03 19:10:05 +05:30
|
|
|
return WillPopScope(
|
|
|
|
|
onWillPop: () async {
|
|
|
|
|
exitAppDialog(context);
|
|
|
|
|
return false;
|
|
|
|
|
},
|
|
|
|
|
child: Scaffold(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
body: currentTab[selectedIndex],
|
|
|
|
|
bottomNavigationBar: bottomnavigationbar(selectedIndex),
|
|
|
|
|
),
|
2024-05-30 13:56:20 +05:30
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|