Bloc: Listview pagination issue.

Created on 13 May 2020  路  3Comments  路  Source: felangel/bloc

Describe the bug
when using normal mobile pagination correctly working but when using tablet loading issue occurred can you check below video.

ezgif com-video-to-gif

bug example good first issue

Most helpful comment

Hi @cgowthamanmca 馃憢
Thanks for opening an issue!

Thanks for bringing this up. This is likely happening because the content never fills the screen height so the scrolling offset never triggers a fetch event. I'll try to update this shortly 馃憤

All 3 comments

Hi @cgowthamanmca 馃憢
Thanks for opening an issue!

Thanks for bringing this up. This is likely happening because the content never fills the screen height so the scrolling offset never triggers a fetch event. I'll try to update this shortly 馃憤

@cgowthamanmca I solve this issue with a simple trick:

Use AfterLayoutMixin ( https://pub.dev/packages/after_layout ) and add this code into
overrided method: void afterFirstLayout(BuildContext context);
Future.microtask(() => _postBloc..add(PostFetched()));

the result code is like this:

 @override
  void afterFirstLayout(BuildContext context) {
    // Fix bug in n infinite list with less items of page size or with bigger device height
    Future.microtask(() => _postBloc..add(PostFetched()));
  }

I hope it will be useful to you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

komapeb picture komapeb  路  3Comments

abinvp picture abinvp  路  3Comments

Reidond picture Reidond  路  3Comments

tigranhov picture tigranhov  路  3Comments

krusek picture krusek  路  3Comments