What I have:
- Interface (InterfaceA) with a method that must be overridden.
- Restricted to interface mixin (MixinB) with a method that I want to use without overriding.
- Class (ClassC) with implementation of interface and usage of mixin.
Question: Is it possible to use restricted mixin to interface with implementation of that interface at the same time?
Code below is an example and shows how I ideally want to use mixin and interface
abstract class InterfaceA {
int getValue();
}
mixin MixinB on InterfaceA {
int getPreValue(int i) => i;
}
// Error:
// 'Object' doesn't implement 'InterfaceA' so it can't be used with 'MixinB'.
class ClassC with MixinB implements InterfaceA {
@override
getValue() => getPreValue(2);
}