main.dart 995 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import 'package:flutter/material.dart';
  2. import 'pages/index_page.dart';
  3. import 'generated/l10n.dart';
  4. import 'package:flutter_localizations/flutter_localizations.dart';
  5. void main() => runApp(GameApp());
  6. class GameApp extends StatefulWidget {
  7. @override
  8. State<StatefulWidget> createState() => _GameAppState();
  9. }
  10. class _GameAppState extends State<GameApp> {
  11. @override
  12. Widget build(BuildContext context) {
  13. return MaterialApp(
  14. localizationsDelegates: [
  15. S.delegate,
  16. GlobalMaterialLocalizations.delegate,
  17. GlobalWidgetsLocalizations.delegate,
  18. GlobalCupertinoLocalizations.delegate,
  19. ],
  20. supportedLocales: S.delegate.supportedLocales,
  21. debugShowCheckedModeBanner: false,
  22. title: "2048",
  23. theme: ThemeData(primaryColor: Colors.orange),
  24. home: Material(
  25. color: Color(0xfffaf8ef),
  26. child: SafeArea(
  27. left: false,
  28. right: false,
  29. child: IndexPage(),
  30. ),
  31. ),
  32. );
  33. }
  34. }