main.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:flutter/material.dart';
  2. import 'package:mvvm_flutter/di/modules.dart';
  3. import 'package:mvvm_flutter/model/remote.dart';
  4. import 'package:mvvm_flutter/model/repository.dart';
  5. import 'package:mvvm_flutter/view/home.dart';
  6. import 'package:provide/provide.dart';
  7. void main() {
  8. runApp(ProviderNode(child: MyApp(), providers: providers));
  9. }
  10. class MyApp extends StatelessWidget {
  11. // This widget is the root of your application.
  12. @override
  13. Widget build(BuildContext context) {
  14. return MaterialApp(
  15. title: 'MVVM-Flutter',
  16. theme: ThemeData(
  17. // This is the theme of your application.
  18. //
  19. // Try running your application with "flutter run". You'll see the
  20. // application has a blue toolbar. Then, without quitting the app, try
  21. // changing the primarySwatch below to Colors.green and then invoke
  22. // "hot reload" (press "r" in the console where you ran "flutter run",
  23. // or simply save your changes to "hot reload" in a Flutter IDE).
  24. // Notice that the counter didn't reset back to zero; the application
  25. // is not restarted.
  26. primarySwatch: Colors.blue,
  27. ),
  28. home: HomeWidget(),
  29. );
  30. }
  31. }