main.dart 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';
  3. import 'ui/main_menu.dart';
  4. import 'utils/colors.dart';
  5. import 'utils/settings_manager.dart';
  6. import 'utils/score_manager.dart';
  7. import 'utils/google_play_games_manager.dart';
  8. void main() async {
  9. WidgetsFlutterBinding.ensureInitialized();
  10. await SettingsManager.init();
  11. await ScoreManager.initialize();
  12. // Initialize Google Play Games (silent init, don't require sign-in)
  13. await GooglePlayGamesManager.instance.initialize();
  14. runApp(const ZenTapApp());
  15. }
  16. class ZenTapApp extends StatelessWidget {
  17. const ZenTapApp({super.key});
  18. @override
  19. Widget build(BuildContext context) {
  20. return MaterialApp(
  21. title: 'ZenTap',
  22. debugShowCheckedModeBanner: false,
  23. theme: ThemeData(
  24. // Use ZenTap color scheme
  25. colorScheme: ColorScheme.dark(
  26. primary: ZenColors.buttonBackground,
  27. secondary: ZenColors.defaultLink,
  28. surface: ZenColors.uiElements,
  29. onPrimary: ZenColors.buttonText,
  30. onSecondary: ZenColors.white,
  31. onSurface: ZenColors.primaryText,
  32. ),
  33. scaffoldBackgroundColor: ZenColors.appBackground,
  34. appBarTheme: const AppBarTheme(
  35. backgroundColor: ZenColors.appBackground,
  36. foregroundColor: ZenColors.primaryText,
  37. elevation: 0,
  38. systemOverlayStyle: SystemUiOverlayStyle.light,
  39. ),
  40. textTheme: const TextTheme(
  41. bodyLarge: TextStyle(color: ZenColors.primaryText),
  42. bodyMedium: TextStyle(color: ZenColors.primaryText),
  43. bodySmall: TextStyle(color: ZenColors.secondaryText),
  44. titleLarge: TextStyle(color: ZenColors.primaryText),
  45. titleMedium: TextStyle(color: ZenColors.primaryText),
  46. titleSmall: TextStyle(color: ZenColors.primaryText),
  47. ),
  48. elevatedButtonTheme: ElevatedButtonThemeData(
  49. style: ElevatedButton.styleFrom(
  50. backgroundColor: ZenColors.buttonBackground,
  51. foregroundColor: ZenColors.buttonText,
  52. elevation: 4,
  53. shape: RoundedRectangleBorder(
  54. borderRadius: BorderRadius.circular(12),
  55. ),
  56. ),
  57. ),
  58. dialogTheme: DialogThemeData(
  59. backgroundColor: ZenColors.uiElements,
  60. titleTextStyle: const TextStyle(
  61. color: ZenColors.primaryText,
  62. fontSize: 20,
  63. fontWeight: FontWeight.bold,
  64. ),
  65. contentTextStyle: TextStyle(
  66. color: ZenColors.secondaryText,
  67. fontSize: 16,
  68. ),
  69. ),
  70. useMaterial3: true,
  71. ),
  72. home: const MainMenu(),
  73. );
  74. }
  75. }