main.dart 617 B

12345678910111213141516171819202122232425
  1. import 'package:flutter/material.dart';
  2. import 'package:get/get_navigation/src/root/get_material_app.dart';
  3. import 'package:get_demo/routes.dart';
  4. void main() {
  5. runApp(const MyApp());
  6. }
  7. class MyApp extends StatelessWidget {
  8. const MyApp({super.key});
  9. // This widget is the root of your application.
  10. @override
  11. Widget build(BuildContext context) {
  12. return GetMaterialApp(
  13. title: 'Flutter get 状态管理demo',
  14. debugShowCheckedModeBanner: false,
  15. theme: ThemeData(
  16. primarySwatch: Colors.blue,
  17. ),
  18. initialRoute: Routes.home,
  19. getPages: Routes.routes,
  20. );
  21. }
  22. }