kiwi 1.1.0 copy "kiwi: ^1.1.0" to clipboard
kiwi: ^1.1.0 copied to clipboard

outdated

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 {}
154
likes
30
pub points
95%
popularity

Publisher

verified publishergbtb16.com.br

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

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on kiwi