PageFetcher<T> typedef

PageFetcher<T> = Future<List<T>> Function(int page, int limit)

Signature for a function that fetches a page of items.

page is the 1-based page number to fetch. limit is the maximum number of items per page.

Return a list of items. Return an empty list to signal that no more pages are available.

Implementation

typedef PageFetcher<T> = Future<List<T>> Function(int page, int limit);