kiwi 2.0.0

Dart native js
Flutter Android iOS web

A simple yet efficient IoC container for Dart and Flutter (can be coupled with the kiwi_generator package).

example/kiwi_example.dart

import 'package:kiwi/kiwi.dart';

main() {
  KiwiContainer container = KiwiContainer();
  container.registerInstance(Logger());
  container.registerSingleton((c) => Logger(), name: 'logA');
  container.registerFactory((c) => ServiceA(c.resolve<Logger>('logA')));
}

class Service {}

class ServiceA extends Service {
  ServiceA(Logger logger);
}

class Logger {}
27
likes
110
pub points
93%
popularity

Publisher

vanlooverenkoen.be

A simple yet efficient IoC container for Dart and Flutter (can be coupled with the kiwi_generator package).

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on kiwi