riverpod_async_value_sync 0.0.2 copy "riverpod_async_value_sync: ^0.0.2" to clipboard
riverpod_async_value_sync: ^0.0.2 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);

return AsyncValueSync.all(
  [valueA, valueB], 
  data: (values) => values,
  error: (values) => values, // the error callback is called if any `AsyncValue` has an error
  loading: () => 'loading',
);
1
likes
115
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

AsyncValue synchronization method

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

riverpod

More

Packages that depend on riverpod_async_value_sync