main.dart 623 B

123456789101112131415161718192021222324252627
  1. import 'package:flutter/material.dart';
  2. import 'package:provider/provider.dart';
  3. import 'di/app_module.dart';
  4. import 'view/home_page.dart';
  5. void main() async {
  6. WidgetsFlutterBinding.ensureInitialized();
  7. // wait init
  8. await init();
  9. Provider.debugCheckInvalidValueType = null;
  10. runApp(MyApp());
  11. }
  12. class MyApp extends StatelessWidget {
  13. // This widget is the root of your application.
  14. @override
  15. Widget build(BuildContext context) {
  16. return MaterialApp(
  17. title: 'MVVM-Flutter',
  18. theme: ThemeData(
  19. primarySwatch: Colors.blue,
  20. ),
  21. home: HomePage('MVVM-Flutter'));
  22. }
  23. }