gbtb16 / kiwi

A simple compile-time dependency injection library for Dart and Flutter
MIT License
352 stars 51 forks source link

Class could not be registered correctly even when defaults are specified #77

Open vanlooverenkoen opened 2 years ago

vanlooverenkoen commented 2 years ago
Failed to resolve `IOSOptions`:
The type `IOSOptions` was not registered
Make sure `IOSOptions` is added to your KiwiContainer and rerun build_runner build
(If you are using the kiwi_generator)
When using Flutter, most of the time a hot restart is required to setup the KiwiContainer again.

There is probably an issue with default values

const FlutterSecureStorage({
  this.iOptions = IOSOptions.defaultOptions,
  this.aOptions = AndroidOptions.defaultOptions,
  this.lOptions = LinuxOptions.defaultOptions,
  this.wOptions = WindowsOptions.defaultOptions,
  this.webOptions = WebOptions.defaultOptions,
  this.mOptions = MacOsOptions.defaultOptions,
});