read not watch MultiProviderController providers
Fixes random loading animations
This commit is contained in:
parent
269d97be8f
commit
436b8642b3
1 changed files with 4 additions and 2 deletions
|
|
@ -6,8 +6,10 @@ import "package:flutter_riverpod/flutter_riverpod.dart";
|
|||
class MultiProviderController(final IList<AsyncNotifierProvider> providers)
|
||||
extends AsyncNotifier<void> {
|
||||
@override
|
||||
Future<void> build() =>
|
||||
.wait(providers.map((provider) => ref.watch(provider.future)));
|
||||
Future<void> build() => .wait(
|
||||
providers.map((provider) => ref.read(provider.future)),
|
||||
eagerError: true,
|
||||
);
|
||||
|
||||
static final provider =
|
||||
AsyncNotifierProvider.family<
|
||||
|
|
|
|||
Loading…
Reference in a new issue