67 lines
1.8 KiB
Dart
67 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'customer_map_screen.dart';
|
|
import 'dummy_screen.dart';
|
|
import 'more_screen.dart';
|
|
import 'orders_screen.dart';
|
|
|
|
class MainNavigationScreen extends StatefulWidget {
|
|
const MainNavigationScreen({super.key});
|
|
|
|
@override
|
|
State<MainNavigationScreen> createState() => _MainNavigationScreenState();
|
|
}
|
|
|
|
class _MainNavigationScreenState extends State<MainNavigationScreen> {
|
|
// Start on tab 1 (Kunden / Map Screen) as requested in the mockup
|
|
int _currentIndex = 1;
|
|
|
|
final List<Widget> _screens = const [
|
|
DummyScreen(title: 'Übersicht', icon: Icons.grid_view),
|
|
CustomerMapScreen(),
|
|
OrdersScreen(),
|
|
DummyScreen(title: 'Kalender', icon: Icons.calendar_month_outlined),
|
|
MoreScreen(),
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: IndexedStack(
|
|
index: _currentIndex,
|
|
children: _screens,
|
|
),
|
|
bottomNavigationBar: BottomNavigationBar(
|
|
currentIndex: _currentIndex,
|
|
onTap: (index) {
|
|
setState(() {
|
|
_currentIndex = index;
|
|
});
|
|
},
|
|
items: const [
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.grid_view),
|
|
label: 'Übersicht',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.person_outline),
|
|
activeIcon: Icon(Icons.person),
|
|
label: 'Kunden',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.receipt_long_outlined),
|
|
label: 'Aufträge',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.calendar_month_outlined),
|
|
label: 'Kalender',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.more_horiz),
|
|
label: 'Mehr',
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|