Files
dailyou/lib/app.dart
T
stefwill fefb61ffae feat: add bottom navigation shell with four tabs
Introduces AppShell with an IndexedStack-backed NavigationBar (Today,
History, Insights, Settings). Stub screens added for Calendar, Insights,
and Settings; app.dart now routes to AppShell instead of LogMoodScreen directly.
2026-04-26 14:21:12 +10:00

45 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'core/providers/settings_provider.dart';
import 'shell.dart';
class App extends ConsumerWidget {
const App({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final onboardingAsync = ref.watch(isOnboardingCompleteProvider);
return MaterialApp(
title: 'DailyYou',
debugShowCheckedModeBanner: false,
theme: _lightTheme(),
darkTheme: _darkTheme(),
themeMode: ThemeMode.system,
home: onboardingAsync.when(
data: (complete) => const AppShell(),
loading: () => const Scaffold(
body: Center(child: CircularProgressIndicator()),
),
error: (e, _) => const AppShell(),
),
);
}
ThemeData _lightTheme() => ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: const Color(0xFF6B8CFF),
brightness: Brightness.light,
),
);
ThemeData _darkTheme() => ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: const Color(0xFF6B8CFF),
brightness: Brightness.dark,
),
);
}