简体   繁体   中英

Pull-To-Refresh, but instead of refreshing, bring a new page on flutter

I'm new to flutter and I'd like to know if it's possible in a ListView that when the user reaches the bottom, a pull-to-refresh is enabled, which redirects to another page already (with Navigator ).

I want an effect similar like this .

But under a ListView (the user needs to reach the bottom) and then swipe again to push another page, with a effect like the link above.

It would be possible? I tried used NotificationListener , Scrollable Controller , and nothing happened.

The specific effect I want is when the user reaches the bottom, it has a 'pull to refresh' effect like Twitter (where you swipe up (hold), a text appears, and when you realise the finger, the page updates, where in my app, it brings another page)

I tried something with 'Gesture Detector' on a card at the bottom - and it kinda works, but I don't have the animation of swiping holding and releasing the finger.

Let me know if i can clarify this question more. Thanks

Use PageView like so:

PageView(
  children: <Widget>[
    // Add children here
  ],
  scrollDirection: Axis.vertical,
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM