flutter_clock_example/lib/main.dart

47 lines
1.0 KiB
Dart
Raw Permalink Normal View History

2023-08-23 03:55:33 +08:00
import 'package:flutter/material.dart';
2023-09-29 21:16:25 +08:00
import 'timers_page.dart';
import 'timers_page_landscape.dart';
import 'constants.dart';
2023-08-23 03:55:33 +08:00
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
2023-08-23 03:55:33 +08:00
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
2023-08-23 03:55:33 +08:00
}
class _MyAppState extends State<MyApp> {
2023-08-23 03:55:33 +08:00
// This widget is the root of your application.
2023-08-23 03:55:33 +08:00
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
// title: '',
themeMode: myThemeMode,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: mySeedColor,
brightness: Brightness.light,
2023-08-23 03:55:33 +08:00
),
useMaterial3: true,
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: mySeedColor,
brightness: Brightness.dark,
2023-08-23 03:55:33 +08:00
),
useMaterial3: true,
),
home: (MediaQuery.of(context).size.width > 600)
? const TimersPageLandscape()
: const TimersPage(),
2023-08-23 03:55:33 +08:00
);
}
}