Currently reloading takes the current state's filter
Code Link
Future<void> reload([F? filter]) => super.load(filter);
// in data_cubit.dart
Future<void> load([F? filter]) async {
final f = filter ?? state.filter;
// etc...
If the user scrolls to the last item, then after reaching the last item the ContinuousScrollBuilder will take the total item's length as the current offset and try to fetch items. As of this moment, the filter's offset value becomes the length of the items.
Code Link
final offset = _cubit.state.data?.length ?? 0;
Then if we reload the list the cubit will return 0 items and the previously loaded items will vanish due to the wrong offset value.(This offset value is the last items offset after that no items are available to fetch)
Currently reloading takes the current state's filter Code Link
If the user scrolls to the last item, then after reaching the last item the ContinuousScrollBuilder will take the total item's length as the current offset and try to fetch items. As of this moment, the filter's offset value becomes the length of the items. Code Link
Then if we reload the list the cubit will return 0 items and the previously loaded items will vanish due to the wrong offset value.(This offset value is the last items offset after that no items are available to fetch)