Shreyansh Sharma
Shreyansh Sharma

Reputation: 1844

How to insert facebook type pagination in flutter

I am trying to insert pagination in my flutter app, which will look exactly like the ine in facebook. I have read about infinite_scroll_pagination package, but I was not able to achieve it. Can anyone help me on this please?

enter image description here

enter image description here

Upvotes: 0

Views: 108

Answers (1)

Ruchit
Ruchit

Reputation: 2770

For this you should use refreshindicator as shown in official flutter docs.

RefreshIndicator(
    onRefresh: _onRefresh,
    child: ListView(
      padding: EdgeInsets.all(8.0),
      physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
      children: _listData.map((i) {
        return ListTile(
          title: Text("Item $i"),
        );
      }).toList(),
    )
);

enter image description here

Upvotes: 1

Related Questions