main.dart 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. void main() async {
  7. WidgetsFlutterBinding.ensureInitialized();
  8. await SettingsManager.init();
  9. runApp(const ZenTapApp());
  10. }
  11. class ZenTapApp extends StatelessWidget {
  12. const ZenTapApp({super.key});
  13. @override
  14. Widget build(BuildContext context) {
  15. return MaterialApp(
  16. title: 'ZenTap',
  17. debugShowCheckedModeBanner: false,
  18. theme: ThemeData(
  19. // Use ZenTap color scheme
  20. colorScheme: ColorScheme.dark(
  21. primary: ZenColors.buttonBackground,
  22. secondary: ZenColors.defaultLink,
  23. surface: ZenColors.uiElements,
  24. onPrimary: ZenColors.buttonText,
  25. onSecondary: ZenColors.white,
  26. onSurface: ZenColors.primaryText,
  27. ),
  28. scaffoldBackgroundColor: ZenColors.appBackground,
  29. appBarTheme: const AppBarTheme(
  30. backgroundColor: ZenColors.appBackground,
  31. foregroundColor: ZenColors.primaryText,
  32. elevation: 0,
  33. systemOverlayStyle: SystemUiOverlayStyle.light,
  34. ),
  35. textTheme: const TextTheme(
  36. bodyLarge: TextStyle(color: ZenColors.primaryText),
  37. bodyMedium: TextStyle(color: ZenColors.primaryText),
  38. bodySmall: TextStyle(color: ZenColors.secondaryText),
  39. titleLarge: TextStyle(color: ZenColors.primaryText),
  40. titleMedium: TextStyle(color: ZenColors.primaryText),
  41. titleSmall: TextStyle(color: ZenColors.primaryText),
  42. ),
  43. elevatedButtonTheme: ElevatedButtonThemeData(
  44. style: ElevatedButton.styleFrom(
  45. backgroundColor: ZenColors.buttonBackground,
  46. foregroundColor: ZenColors.buttonText,
  47. elevation: 4,
  48. shape: RoundedRectangleBorder(
  49. borderRadius: BorderRadius.circular(12),
  50. ),
  51. ),
  52. ),
  53. dialogTheme: DialogTheme(
  54. backgroundColor: ZenColors.uiElements,
  55. titleTextStyle: const TextStyle(
  56. color: ZenColors.primaryText,
  57. fontSize: 20,
  58. fontWeight: FontWeight.bold,
  59. ),
  60. contentTextStyle: TextStyle(
  61. color: ZenColors.secondaryText,
  62. fontSize: 16,
  63. ),
  64. ),
  65. useMaterial3: true,
  66. ),
  67. home: const MainMenu(),
  68. );
  69. }
  70. }