34 lines
990 B
Dart
34 lines
990 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'Peach/configs/ThemeController.dart';
|
|
import 'Peach/designs/Backdrop.dart';
|
|
import 'Peach/see/splash/Splash.dart';
|
|
import 'Peach/utils/Colors.dart';
|
|
|
|
void main() {
|
|
runApp(const Peach());
|
|
}
|
|
|
|
/// The app shell: theme, the glow backdrop, and the splash that loads stored
|
|
/// state before handing over to Home. Everything else lives under
|
|
/// `lib/Peach/see/` as a four-file screen.
|
|
class Peach extends StatelessWidget {
|
|
const Peach({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ValueListenableBuilder<ThemeMode>(
|
|
valueListenable: ThemeController.mode,
|
|
builder: (context, mode, child) => MaterialApp(
|
|
title: 'Peach',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: PeachTheme.light(),
|
|
darkTheme: PeachTheme.dark(),
|
|
themeMode: mode,
|
|
builder: (context, child) => Backdrop(child: child ?? const SizedBox()),
|
|
home: const Splash(),
|
|
),
|
|
);
|
|
}
|
|
}
|