refetch method

Future<void> refetch({
  1. bool cancelRefetch = true,
})

Refetches every source, as each one's own refetch does.

cancelRefetch is passed to every source: true, the default as on a single result, cancels a fetch already running over data and starts again; false joins it. Two combinations that share a source refetch it once each, so a pull-to-refresh over both fetches it twice unless one of them passes false.

Implementation

Future<void> refetch({bool cancelRefetch = true}) => Future.wait([
      for (final source in _sources)
        source.refetch(cancelRefetch: cancelRefetch),
    ]);