You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

2 years ago
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_riverpod/flutter_riverpod.dart';
  3. import 'package:my_flutter_puzzle/res/palette.dart';
  4. import 'package:my_flutter_puzzle/screens/level_list/screen/level_list_screen.dart';
  5. import 'package:my_flutter_puzzle/utils/color_brightness.dart';
  6. import 'package:url_strategy/url_strategy.dart';
  7. void main() async {
  8. setPathUrlStrategy();
  9. WidgetsFlutterBinding.ensureInitialized();
  10. runApp(const ProviderScope(child: MyApp()));
  11. }
  12. class MyApp extends StatelessWidget {
  13. const MyApp({Key? key}) : super(key: key);
  14. @override
  15. Widget build(BuildContext context) {
  16. return MaterialApp(
  17. title: 'Flutter Puzzle',
  18. debugShowCheckedModeBanner: false,
  19. theme: ThemeData(
  20. primarySwatch: Colors.blue,
  21. fontFamily: 'GoogleSans',
  22. backgroundColor: Palette.blue.darken(0.3),
  23. colorScheme: ColorScheme(
  24. brightness: Theme.of(context).brightness,
  25. primary: Palette.blue,
  26. onPrimary: Colors.white,
  27. secondary: Palette.blue.withOpacity(0.6),
  28. onSecondary: Palette.blue.withOpacity(0.3),
  29. error: Theme.of(context).colorScheme.error,
  30. onError: Theme.of(context).colorScheme.onError,
  31. background: Palette.blue.darken(0.3),
  32. onBackground: Colors.white,
  33. surface: Palette.crimson,
  34. onSurface: Colors.white38,
  35. ),
  36. ),
  37. home: const LevelListScreen(),
  38. );
  39. }
  40. }