summaryrefslogtreecommitdiff
path: root/lib/main.dart
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2026-09-28 19:23:35 -0400
committerMica White <botahamec@outlook.com>2026-09-28 19:23:35 -0400
commit1c8fee757e6125ff510f07106fb6304e89b2fad5 (patch)
tree7b1d4b885ded011de77fc77389d86de0ffaf7a05 /lib/main.dart
Condense all commits into one commit
At some point, I think I committed the Flutter binary. It's too deep to fix it now. At this point, I think my only solution is to delete my .git directory and re-initialize it.
Diffstat (limited to 'lib/main.dart')
-rwxr-xr-xlib/main.dart38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/main.dart b/lib/main.dart
new file mode 100755
index 0000000..403427c
--- /dev/null
+++ b/lib/main.dart
@@ -0,0 +1,38 @@
+import 'package:flutter/material.dart';
+
+import 'home.dart';
+import 'jotai.dart';
+
+enum SpeedUnit { milesPerHour, kilometersPerHour }
+
+void main() async {
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return ObserverBuilder(
+ observable: themeModeObservable,
+ builder: (context, themeMode, _) => ObserverBuilder(
+ observable: primaryColorObservable,
+ builder: (context, primaryColor, _) => MaterialApp(
+ title: 'Simple Speedometer',
+ theme: ThemeData(
+ colorScheme: ColorScheme.fromSeed(seedColor: primaryColor),
+ ),
+ darkTheme: ThemeData(
+ colorScheme: ColorScheme.fromSeed(
+ seedColor: primaryColor,
+ brightness: Brightness.dark,
+ ),
+ ),
+ themeMode: themeMode,
+ home: HomePage(),
+ ),
+ ),
+ );
+ }
+}