Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Check If Scroll Position is Top or Bottom? #45

Open
AsadAMalikDeveloper opened this issue May 20, 2022 · 4 comments
Open

How to Check If Scroll Position is Top or Bottom? #45

AsadAMalikDeveloper opened this issue May 20, 2022 · 4 comments

Comments

@AsadAMalikDeveloper
Copy link

No description provided.

@lkrjangid1
Copy link

Use GroupedItemScrollController

  final GroupedItemScrollController itemScrollController =
      GroupedItemScrollController();

itemPositionsListener.itemPositions.addListener(() {
      if (itemPositionsListener.itemPositions.value.last.index ==
          itemsPosition) {
//run your code
}});

@RajeshPandey057
Copy link

From where we get item position ?

@bhanubbs
Copy link

I used Notification Listener (ScrollUpdateNotification)

bool scrollListner(ScrollUpdateNotification scrollEnd) {
    if (scrollEnd.metrics.pixels > scrollEnd.metrics.maxScrollExtent ) {
      reached top (if reverse is true)
    } else if (scrollEnd.metrics.pixels <
        scrollEnd.metrics.minScrollExtent) {
      print('Reached bottom');
    }
    return true;
  }

@asadamatic
Copy link

asadamatic commented Aug 15, 2023

#7 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants