pvt-project-google-maps/lib/BottomNavPage.dart
stjertnylle 910e48dfba Merge branch 'shas6395-ShadowMap' of gitea.dsv.su.se:maze6343/pvt-project-google-maps into LoginPage
 Conflicts:
	.dart_tool/package_config.json
	.packages
	lib/globals.dart
2022-05-19 11:17:44 +02:00

50 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:google_maps_flutter_platform_interface/src/types/camera.dart';
import 'Map.dart';
import 'FavoritePage.dart';
import 'SettingsPage.dart';
import 'globals.dart' as globals;
class BottomNavPage extends StatefulWidget {
@override
State<BottomNavPage> createState() => BottomNavPageState();
}
class BottomNavPageState extends State<BottomNavPage> {
int currentIndex = 0;
final screens =[
Map(),
FavoritePage(),
SettingsPage(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
body: screens[currentIndex],
bottomNavigationBar: BottomNavigationBar(
backgroundColor: globals.BACKGROUNDCOLOR,
selectedItemColor: globals.ITEMCOLOR,
currentIndex: currentIndex,
onTap: (index) => setState( () => currentIndex = index),
items: const[
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: "Home",
),
BottomNavigationBarItem(
icon: Icon(Icons.favorite),
label: "Liked",
),
BottomNavigationBarItem(
icon: Icon(Icons.settings),
label: "Settings",
),
]),
);
}
}