fluttercandies / extended_nested_scroll_view

extended nested scroll view to fix following issues. 1.pinned sliver header issue 2.inner scrollables in tabview sync issue 3.pull to refresh is not work. 4.do without ScrollController in NestedScrollView's body
MIT License
591 stars 117 forks source link

[BUG & REQUEST] PullToRefresh for Outer Scroller, Allow over scrolling #72

Closed yasinarik closed 3 years ago

yasinarik commented 3 years ago

Hi, thank you for building this package.

I want to use your pull_to_refresh package with extended_nested_scroll_view.

The problem is your method does that the overscroll and indicator happen on the inner scrollers below the tabs.

However, I have to do it on the outer scroller. (top of the scroller).

Please have a look at the below image. The overscroll physics is done on the outer scroller. Not on the inner scrollers of the tabs. So the refresh indicator can be placed on top of the page where the overscroll happens. Not in between the tab button area and inner scroller.

I even tried doing some tricky solutions and created an algorithm with NotificationListener (and using notification types). It almost works while overscrolling; however, it doesn't when moving in the opposite direction of the overscroll direction. In other words, the OverscrollNotification works as expected when dragging down but not when dragging up.

Instagram Profile Screen - This is what I want since it provides the best UX.

instagram-overscroll

This is the current package, from your examples

currently

zmtzawqlp commented 3 years ago
  1. pull_to_refresh is not my package.
  2. you can pull to refresh in out or inner

inner : https://github.com/fluttercandies/extended_nested_scroll_view/blob/master/example/lib/pages/complex/pull_to_refresh.dart

outer: https://github.com/fluttercandies/pull_to_refresh_notification/blob/master/example/lib/pages/complex/pull_to_refresh_header.dart

yasinarik commented 3 years ago

@zmtzawqlp Thanks for replying! :)

  1. pull_to_refresh is not my package.

Sorry, I caused a misunderstanding by writing it wrongly. I meant I want to implement a pull to refresh mechanism with your ExtendedNestedScrollView package. (By the way, I don't need any package for pull to refresh, I can build my own)

Inner Example

  1. you can pull to refresh in out or inner

inner: https://github.com/fluttercandies/extended_nested_scroll_view/blob/master/example/lib/pages/complex/pull_to_refresh.dart

✅ The above example is for ExtendedNestedScrollView and yes, you can implement over scrolling & pull to refresh to inner scroller.

Outer Example

outer: https://github.com/fluttercandies/pull_to_refresh_notification/blob/master/example/lib/pages/complex/pull_to_refresh_header.dart

❌ I have already seen the second example. This example uses CustomScrollView, not NestedScrollView. There is a very big difference.

The layout should be like this:

//over scroll & refresh indicator should be here, not in the body
NestedScrollView(
  TabView(
    CustomScrollView(

Please reconsider the issue. There is a problem with ExtendedNestedScrollView that it doesn't allow over scrolling on the outer scroller.

zmtzawqlp commented 3 years ago

PullToRefreshNotification( NestedScrollView(header:[PullToRefreshContainer], body: xxx))

yasinarik commented 3 years ago

PullToRefreshNotification( NestedScrollView(header:[PullToRefreshContainer], body: xxx))

Can you prove that it works? I've already tried that. Sorry, but I am almost sure it doesn't work like that, unfortunately.

zmtzawqlp commented 3 years ago

https://github.com/fluttercandies/extended_nested_scroll_view/blob/master/example/lib/pages/complex/pull_to_refresh_outer.dart