pvt-project-google-maps/lib/BottomNavPage.dart
shas6395 e7ac9f1737 Merge remote-tracking branch 'origin/LoginPage'
# Conflicts:
#	.dart_tool/package_config.json
#	.packages
#	lib/Map.dart
#	lib/globals.dart
#	lib/main.dart
2022-05-19 13:51:13 +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",
),
]),
);
}
}