import 'package:flutter/material.dart'; import 'dashboard_screen.dart'; import 'tasks_screen.dart'; import 'mind_map_screen.dart'; import 'calendar_screen.dart'; import 'alarms_screen.dart'; class HomeScreen extends StatefulWidget { const HomeScreen({super.key}); @override State createState() => _HomeScreenState(); } class _HomeScreenState extends State { int _selectedIndex = 0; final List _screens = [ const DashboardScreen(), const TasksScreen(), const MindMapScreen(), const CalendarScreen(), const AlarmsScreen(), ]; @override Widget build(BuildContext context) { return Scaffold( body: _screens[_selectedIndex], bottomNavigationBar: NavigationBar( selectedIndex: _selectedIndex, onDestinationSelected: (index) { setState(() { _selectedIndex = index; }); }, destinations: const [ NavigationDestination( icon: Icon(Icons.dashboard_outlined), selectedIcon: Icon(Icons.dashboard), label: 'Главная', ), NavigationDestination( icon: Icon(Icons.task_outlined), selectedIcon: Icon(Icons.task), label: 'Задачи', ), NavigationDestination( icon: Icon(Icons.account_tree_outlined), selectedIcon: Icon(Icons.account_tree), label: 'Mind-карта', ), NavigationDestination( icon: Icon(Icons.calendar_today_outlined), selectedIcon: Icon(Icons.calendar_today), label: 'Календарь', ), NavigationDestination( icon: Icon(Icons.alarm_outlined), selectedIcon: Icon(Icons.alarm), label: 'Будильники', ), ], ), ); } }