voyagehandbook/lib/main.dart

33 lines
842 B
Dart
Raw Normal View History

2023-03-18 16:55:08 +01:00
import 'package:dynamic_color/dynamic_color.dart';
2023-03-16 14:57:15 +01:00
import 'package:flutter/material.dart';
2023-03-18 16:55:08 +01:00
import 'package:voyagehandbook/util/color_schemes.g.dart';
import 'package:voyagehandbook/views/home.dart';
2023-03-16 14:57:15 +01:00
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
2023-03-18 16:55:08 +01:00
return DynamicColorBuilder(
builder: (lightDynamic, darkDynamic) => MaterialApp(
title: 'Voyage Handbook',
theme: ThemeData(
useMaterial3: true,
colorScheme: lightDynamic ?? lightColorScheme
),
darkTheme: ThemeData(
useMaterial3: true,
colorScheme: darkDynamic ?? darkColorScheme
2023-03-16 14:57:15 +01:00
),
2023-03-18 16:55:08 +01:00
home: const HomeView(),
2023-03-16 14:57:15 +01:00
),
2023-03-18 16:55:08 +01:00
2023-03-16 14:57:15 +01:00
);
}
}