Initial commit
This commit is contained in:
parent
32e425f961
commit
e94d583b8b
67 changed files with 2516 additions and 698 deletions
15
lib/providers/warmup_provider.dart
Normal file
15
lib/providers/warmup_provider.dart
Normal file
|
@ -0,0 +1,15 @@
|
|||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
part "warmup_provider.g.dart";
|
||||
|
||||
@riverpod
|
||||
Future<void> warmup(
|
||||
Ref ref,
|
||||
IList<AutoDisposeFutureProvider> providers,
|
||||
) async =>
|
||||
await Future.wait(
|
||||
providers.map(
|
||||
(provider) => ref.watch(provider.future),
|
||||
),
|
||||
);
|
Reference in a new issue