main skeleton of app
This commit is contained in:
commit
24f458b06f
36 changed files with 1783 additions and 0 deletions
35
lib/app.dart
Normal file
35
lib/app.dart
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:system_theme/system_theme.dart';
|
||||
|
||||
import 'pages.dart';
|
||||
|
||||
class LadleApp extends StatelessWidget {
|
||||
const LadleApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FluentApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Ladle',
|
||||
theme: ThemeData.light()
|
||||
..copyWith(
|
||||
accentColor: SystemTheme.accentColor.accent.toAccentColor(),
|
||||
),
|
||||
darkTheme: ThemeData.dark()
|
||||
..copyWith(
|
||||
accentColor: SystemTheme.accentColor.accent.toAccentColor(),
|
||||
),
|
||||
onGenerateRoute: _generateRoutes,
|
||||
);
|
||||
}
|
||||
|
||||
Route? _generateRoutes(RouteSettings settings) {
|
||||
if (settings.name == '/') {
|
||||
return FluentPageRoute(
|
||||
builder: (context) => const HomePage(),
|
||||
);
|
||||
}
|
||||
|
||||
throw Exception('Invalid route: ${settings.name}');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue