injectable_mvvm 0.1.0 copy "injectable_mvvm: ^0.1.0" to clipboard
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.

example/lib/main.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(),
    );
  }
}
4
likes
130
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

fmvvm is a convenient code generator for get_it. Inspired by Angular DI, Guice DI and inject.dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, get_it, provider

More

Packages that depend on injectable_mvvm