Skip to content

[Bug] PagingStatus.loadingFirstPage doesn't guarantee that loading is in progress #400

@MrLepage

Description

@MrLepage

Steps to reproduce

The PagingStatus.loadingFirstPage status can be returned even when isLoading == false, which is misleading given the name suggests an active loading state.

Expected results

PagingStatus.loadingFirstPage should only be returned when:

  • No items have been loaded yet (_itemCount == null)
  • No error has occurred (!_hasError)
  • AND a fetch is currently in progress (isLoading == true)

Actual results

bool get _isLoadingFirstPage => _itemCount == null && !_hasError;
This means PagingStatus.loadingFirstPage can be returned for an initial empty state (PagingState()) even when no fetch is actually in progress.

Package Version

5.1.1

Platform

iOS

Code sample

Described above

Logs

Screenshots or Video

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions