paging library

The paging fakes alone, free of Flutter: for packages tested with dart test, which can't load the network fakes (sinew_network imports Flutter through connectivity_plus). sinew_testing.dart exports them too.

Classes

ControlledFetch<T>
A paging fetch the test completes by hand, so every race (a late response, a refresh during more, a search during a load) can be written in order.
FetchCall<T>
One call to a ControlledFetch: the page, cursor or last ID it asked for, and its query.

Functions

controlledFetch<T>() → ControlledFetch<T>
A ControlledFetch whose ControlledFetch.assertAllCompleted runs when the test ends, so a race left unanswered fails the test instead of passing silently. Call it inside a test or a setUp.