vicodin 1.0.3 copy "vicodin: ^1.0.3" to clipboard
vicodin: ^1.0.3 copied to clipboard

outdated

Vicodin is a very simple and yet very useful pure Dart dependency container.

example/example.dart

import 'package:vicodin/vicodin.dart';

class Person {
  final String firstName;

  Person(this.firstName);
}

void main() {
  final module = moduleOf((r) {
    r.singleton<Person>((c) => Person("Vicodin"));
  });
  final component = componentOf(import: [module]);

  final Person person1 = component.resolve();
  final Person person2 = component.resolve();
  print(identical(person1, person2));
}
9
likes
0
pub points
37%
popularity

Publisher

verified publisherglynskyi.com

Vicodin is a very simple and yet very useful pure Dart dependency container.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on vicodin