get_it_mixin 4.2.2 copy "get_it_mixin: ^4.2.2" to clipboard
get_it_mixin: ^4.2.2 copied to clipboard

mixin on Stateless- and StatefulWidgts that makes binding the Widget to Objects stored in GetIt easier.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_weather_demo/weather_manager.dart';
import 'package:get_it/get_it.dart';

import 'homepage.dart';

void main() {
  registerManager();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: HomePage(),
    );
  }
}

void registerManager() {
  GetIt.I.registerSingleton<WeatherManager>(WeatherManager());
}
138
likes
140
points
4.97k
downloads

Publisher

unverified uploader

Weekly Downloads

mixin on Stateless- and StatefulWidgts that makes binding the Widget to Objects stored in GetIt easier.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, functional_listener, get_it

More

Packages that depend on get_it_mixin