I'm trying to register a singleton of one class which implements two interfaces. Is that possible? The generator states, that one interface is not a subtype of it's own.
abstract class IOne { ... }
abstract class ITwo { ... }
@module
abstract class RegisterMySingleton {
@LazySingleton(as: IOne)
IOne get one => getIt<MySingleton>();
@LazySingleton(as: ITwo )
ITwo get two => getIt<MySingleton>();
}
@lazySingleton
class MySingleton implements IOne, ITwo { ... }
Output of flutter pub run build_runner build --delete-conflicting-outputs
[IOne] is not a subtype of [IOne]