diff --git a/lib/app.dart b/lib/app.dart index 1a63730..4445a72 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'core/providers/settings_provider.dart'; -import 'features/log_mood/log_mood_screen.dart'; +import 'shell.dart'; class App extends ConsumerWidget { const App({super.key}); @@ -17,11 +17,11 @@ class App extends ConsumerWidget { darkTheme: _darkTheme(), themeMode: ThemeMode.system, home: onboardingAsync.when( - data: (complete) => const LogMoodScreen(), + data: (complete) => const AppShell(), loading: () => const Scaffold( body: Center(child: CircularProgressIndicator()), ), - error: (e, _) => const LogMoodScreen(), + error: (e, _) => const AppShell(), ), ); } diff --git a/lib/features/calendar/calendar_screen.dart b/lib/features/calendar/calendar_screen.dart new file mode 100644 index 0000000..e1b5500 --- /dev/null +++ b/lib/features/calendar/calendar_screen.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class CalendarScreen extends StatelessWidget { + const CalendarScreen({super.key}); + + @override + Widget build(BuildContext context) { + return const Scaffold( + body: Center(child: Text('History coming soon')), + ); + } +} diff --git a/lib/features/insights/insights_screen.dart b/lib/features/insights/insights_screen.dart new file mode 100644 index 0000000..26c37e7 --- /dev/null +++ b/lib/features/insights/insights_screen.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class InsightsScreen extends StatelessWidget { + const InsightsScreen({super.key}); + + @override + Widget build(BuildContext context) { + return const Scaffold( + body: Center(child: Text('Insights coming soon')), + ); + } +} diff --git a/lib/features/settings/settings_screen.dart b/lib/features/settings/settings_screen.dart new file mode 100644 index 0000000..6fcf86a --- /dev/null +++ b/lib/features/settings/settings_screen.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class SettingsScreen extends StatelessWidget { + const SettingsScreen({super.key}); + + @override + Widget build(BuildContext context) { + return const Scaffold( + body: Center(child: Text('Settings coming soon')), + ); + } +} diff --git a/lib/shell.dart b/lib/shell.dart new file mode 100644 index 0000000..bdfa303 --- /dev/null +++ b/lib/shell.dart @@ -0,0 +1,59 @@ +import 'package:flutter/material.dart'; +import 'features/calendar/calendar_screen.dart'; +import 'features/insights/insights_screen.dart'; +import 'features/log_mood/log_mood_screen.dart'; +import 'features/settings/settings_screen.dart'; + +class AppShell extends StatefulWidget { + const AppShell({super.key}); + + @override + State createState() => _AppShellState(); +} + +class _AppShellState extends State { + int _index = 0; + + static const _screens = [ + LogMoodScreen(), + CalendarScreen(), + InsightsScreen(), + SettingsScreen(), + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: IndexedStack( + index: _index, + children: _screens, + ), + bottomNavigationBar: NavigationBar( + selectedIndex: _index, + onDestinationSelected: (i) => setState(() => _index = i), + destinations: const [ + NavigationDestination( + icon: Icon(Icons.mood_outlined), + selectedIcon: Icon(Icons.mood), + label: 'Today', + ), + NavigationDestination( + icon: Icon(Icons.calendar_month_outlined), + selectedIcon: Icon(Icons.calendar_month), + label: 'History', + ), + NavigationDestination( + icon: Icon(Icons.auto_awesome_outlined), + selectedIcon: Icon(Icons.auto_awesome), + label: 'Insights', + ), + NavigationDestination( + icon: Icon(Icons.settings_outlined), + selectedIcon: Icon(Icons.settings), + label: 'Settings', + ), + ], + ), + ); + } +}