BLoC/Cubit state management, ADHD-friendly theme (calming teal, no red), GetIt DI, GoRouter navigation. Screens: task dashboard, focus mode, task create/detail, streaks, time perception, settings, onboarding, auth. Custom widgets: TaskCard, RewardPopup, StreakRing, GentleNudgeCard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
932 B
Dart
32 lines
932 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import 'core/theme/app_theme.dart';
|
|
import 'features/auth/presentation/bloc/auth_bloc.dart';
|
|
import 'routing/app_router.dart';
|
|
|
|
/// Root widget for the FocusFlow app.
|
|
///
|
|
/// Provides BLoCs at the top of the tree so they are available to every
|
|
/// route, then delegates to GoRouter for navigation.
|
|
class FocusFlowApp extends StatelessWidget {
|
|
const FocusFlowApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MultiBlocProvider(
|
|
providers: [
|
|
BlocProvider<AuthBloc>(create: (_) => AuthBloc()..add(AuthCheckRequested())),
|
|
],
|
|
child: MaterialApp.router(
|
|
title: 'FocusFlow',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: AppTheme.light,
|
|
darkTheme: AppTheme.dark,
|
|
themeMode: ThemeMode.system,
|
|
routerConfig: AppRouter.router,
|
|
),
|
|
);
|
|
}
|
|
}
|