| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- import 'package:flutter/material.dart';
- import 'package:flutter/services.dart';
- import 'ui/main_menu.dart';
- import 'utils/colors.dart';
- import 'utils/settings_manager.dart';
- import 'utils/score_manager.dart';
- void main() async {
- WidgetsFlutterBinding.ensureInitialized();
- await SettingsManager.init();
- await ScoreManager.initialize();
- runApp(const ZenTapApp());
- }
- class ZenTapApp extends StatelessWidget {
- const ZenTapApp({super.key});
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- title: 'ZenTap',
- debugShowCheckedModeBanner: false,
- theme: ThemeData(
- // Use ZenTap color scheme
- colorScheme: ColorScheme.dark(
- primary: ZenColors.buttonBackground,
- secondary: ZenColors.defaultLink,
- surface: ZenColors.uiElements,
- onPrimary: ZenColors.buttonText,
- onSecondary: ZenColors.white,
- onSurface: ZenColors.primaryText,
- ),
- scaffoldBackgroundColor: ZenColors.appBackground,
- appBarTheme: const AppBarTheme(
- backgroundColor: ZenColors.appBackground,
- foregroundColor: ZenColors.primaryText,
- elevation: 0,
- systemOverlayStyle: SystemUiOverlayStyle.light,
- ),
- textTheme: const TextTheme(
- bodyLarge: TextStyle(color: ZenColors.primaryText),
- bodyMedium: TextStyle(color: ZenColors.primaryText),
- bodySmall: TextStyle(color: ZenColors.secondaryText),
- titleLarge: TextStyle(color: ZenColors.primaryText),
- titleMedium: TextStyle(color: ZenColors.primaryText),
- titleSmall: TextStyle(color: ZenColors.primaryText),
- ),
- elevatedButtonTheme: ElevatedButtonThemeData(
- style: ElevatedButton.styleFrom(
- backgroundColor: ZenColors.buttonBackground,
- foregroundColor: ZenColors.buttonText,
- elevation: 4,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(12),
- ),
- ),
- ),
- dialogTheme: DialogThemeData(
- backgroundColor: ZenColors.uiElements,
- titleTextStyle: const TextStyle(
- color: ZenColors.primaryText,
- fontSize: 20,
- fontWeight: FontWeight.bold,
- ),
- contentTextStyle: TextStyle(
- color: ZenColors.secondaryText,
- fontSize: 16,
- ),
- ),
- useMaterial3: true,
- ),
- home: const MainMenu(),
- );
- }
- }
|