Skip to content

Using paginatedParamsActivities getter outside stream_feed_flutter package #245

Open
@harsh-verma-jtg

Description

@harsh-verma-jtg

Is your feature request related to a problem? Please describe.

Currently, I'm using GenericFlatFeedCore widget to fetch feed post data and display them on the client side.
As per the documentation if I want to fetch the next set of posts I have to use the loadMore functionality

Screenshot from 2023-02-10 13-50-29

after calling it, the builder method of GenericFlatFeedCore rebuilds with new data.

But what if due to an usecase I want to check if next page exists in pagination or to perform some other action for this generally we have fields like hasNextPage in paginated API's, I searched inside stream_feed_flutter plugin and found out
there is a method exists for Identifying it

Screenshot from 2023-02-10 13-51-25

Inside plugin, they have checked the value of nextParams to determine if next call is to be made, in the case of the last page its value comes to be null.

But it is only allowed to use it for testing purposes as stream_feed handles all pagination functionality internally and doesn't expose any methods like paginatedParams externally.

Is there any alternative way for determining it or any plans to extend paginatedParam activities for development also along with testing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions