watchAll method

DataState<List<T>> watchAll({
  1. bool remote = false,
  2. Map<String, dynamic>? params,
  3. Map<String, String>? headers,
  4. bool syncLocal = false,
  5. String? finder,
  6. DataRequestLabel? label,
})
inherited

Watches a provider wrapping watchAllNotifier which allows the watcher to be notified of changes on any model of this type.

Example: Watch all models of type books on a Riverpod hook-enabled app.

ref.books.watchAll();

Implementation

DataState<List<T>> watchAll({
  bool remote = false,
  Map<String, dynamic>? params,
  Map<String, String>? headers,
  bool syncLocal = false,
  String? finder,
  DataRequestLabel? label,
}) {
  final provider = watchAllProvider(
    remote: remote,
    params: params,
    headers: headers,
    syncLocal: syncLocal,
    finder: finder,
    label: label,
  );
  return internalWatch!(provider);
}