This is my Notifier
:
class Counter extends Notifier<int> {
final int initial;
Counter(this.initial);
@override
int build() => initial;
}
I need to pass initial
value to it, but I'm unable to do that using the family
modifier anymore.
// Error
final counterProvider = NotifierProvider.family<Counter, int, int>((initial) {
// How to get the initial value to pass here?
return Counter(initial);
});