injectable_mvvm 0.1.0 injectable_mvvm: ^0.1.0 copied to clipboard
fmvvm is a convenient code generator for get_it. Inspired by Angular DI, Guice DI and inject.dart.
import 'package:example/features/demo_view_model/presentation/demo_page.dart';
import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart';
import 'package:injectable_mvvm/injectable_mvvm.dart';
import 'package:example/injector/injector.config.dart';
GetIt _ioc = GetIt.instance;
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await _ioc.init(environment: Environment.dev);
runApp(SampleApp());
}
class SampleApp extends StatelessWidget {
const SampleApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Sample App',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: DemoViewPage(),
);
}
}