itemAtProvider top-level property

AutoDisposeProviderFamily<PagingItem, Tuple2<dynamic, int>> itemAtProvider
final

Implementation

final itemAtProvider = AutoDisposeProvider.family<PagingItem, Tuple2<dynamic, int>>((ref, data) {
  final pagingState = ref.watch(pagingControllerProvider(data.item1));
  final itemList = pagingState.itemList;

  if (itemList != null && data.item2 < itemList.length) {
    return itemList[data.item2];
  } else {
    return PagingItemUnknown();
  }
});