Skip to content

1.0.4

Choose a tag to compare

@jonsamwell jonsamwell released this 26 Oct 04:33

[1.0.4] - 26/10/2020

  • Various code optimizations.
  • Api now allows for method chaining so make mapping more concise.
  • Silent removing of non existing mappings (without throwing exceptions).
  • The Injector class now has a factory constructor. An Injector instance can be instantiated
    in a more concise way than Injector.getInjector() which is now marked as deprecated.
    // example with introduced changes
    final injector = Injector();
    injector.map<SomeType>((injector) => SomeType("0"))
            ..map<SomeType>((injector) => SomeType("1"), key: "One")
            ..map<SomeType>((injector) => SomeType("2"), key: "Two");