riverpod_async_value_sync 0.0.1
riverpod_async_value_sync: ^0.0.1 copied to clipboard
AsyncValue synchronization method
riverpod_async_value_sync #
This plugin provides a method to check if all AsyncValue variables from Riverpod are ready for consumption.
Getting Started #
final valueA = ref.watch(providerA);
final valueB = ref.watch(providerB);
AsyncValue.all(
[valueA, valueB],
data: (values) => values,
error: (values) => values, # the error callback is called if any `AsyncValue` has an error
loading: () => 'loading',
);