mirror of
https://github.com/Uuttssaavv/flutter-clean-architecture-riverpod.git
synced 2025-08-06 16:19:42 +08:00
26 lines
725 B
Dart
26 lines
725 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_project/shared/theme/app_theme.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import '../routes/app_route.dart';
|
|
|
|
class MyApp extends ConsumerWidget {
|
|
MyApp({super.key});
|
|
|
|
final appRouter = AppRouter();
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final themeMode = ref.watch(appThemeProvider);
|
|
return MaterialApp.router(
|
|
title: 'Flutter TDD',
|
|
theme: AppTheme.lightTheme,
|
|
darkTheme: AppTheme.darkTheme,
|
|
themeMode: themeMode,
|
|
routeInformationParser: appRouter.defaultRouteParser(),
|
|
routerDelegate: appRouter.delegate(),
|
|
debugShowCheckedModeBanner: false,
|
|
);
|
|
}
|
|
}
|