voyagehandbook/lib/main.dart
2023-03-18 16:55:08 +01:00

32 lines
842 B
Dart

import 'package:dynamic_color/dynamic_color.dart';
import 'package:flutter/material.dart';
import 'package:voyagehandbook/util/color_schemes.g.dart';
import 'package:voyagehandbook/views/home.dart';
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) {
return DynamicColorBuilder(
builder: (lightDynamic, darkDynamic) => MaterialApp(
title: 'Voyage Handbook',
theme: ThemeData(
useMaterial3: true,
colorScheme: lightDynamic ?? lightColorScheme
),
darkTheme: ThemeData(
useMaterial3: true,
colorScheme: darkDynamic ?? darkColorScheme
),
home: const HomeView(),
),
);
}
}