GithubHelp home page GithubHelp logo

Comments (5)

gonuit avatar gonuit commented on May 29, 2024 11

@willladislaw new package version is available on pub.dev.

To fix your example:

  1. depend on:
    dependencies:
      custom_refresh_indicator: 0.9.0
  2. Add notificationPredicate argument to CustomRefreshIndicator widget as follow:
    CustomRefreshIndicator(
       notificationPredicate: (notification) => notification.depth == 1,
       // ...
    )

โ˜๏ธ Now your CustomRefreshIndicator widget will listen only for notifications with dept that equal to 1. It will listen to notifications from CustomScrollView widget.

from flutter-custom-refresh-indicator.

gonuit avatar gonuit commented on May 29, 2024 3

Hi @willladislaw!
It's a known issue, and I'm almost sure that it won't work even on the material RefreshIndicator widget ๐Ÿ˜ž.

Let me describe what happens here.

  1. You are starting dragging the list.
  2. The first list (NestedScrollView) sends scroll notification.
  3. Everything looks good. Indicator state changes to dragging.
  4. Then, the second list (the nested on => CustomScrollView) starts sending notifications (instead of the first list).
  5. Conclusion:
    The indicator doesn't appear because you started scrolling NestedScrollView and ended up scrolling CustomScrollView.

Possible solutions:

  • You can wrap CustomScrollView with the CustomRefreshIndicator widget as it is your main list. โ† Which is a preferred solution.
  • Or, if you for some reason want to place CustomScrollView on top of the NestedScrollView (basically your scrollable app bar) you honestly need to wait for the new version of custom_refresh_indicator (0.9.0) that will introduce notificationPredicate argument that will allow you to listen for the specific depth of scroll notifications.

Let me know if it is what you were looking for.
Have a nice day ๐Ÿ˜ƒ

from flutter-custom-refresh-indicator.

willladislaw avatar willladislaw commented on May 29, 2024 1

Thank you so much.

from flutter-custom-refresh-indicator.

willladislaw avatar willladislaw commented on May 29, 2024 1

...will do later.

from flutter-custom-refresh-indicator.

gonuit avatar gonuit commented on May 29, 2024

You're welcome ๐Ÿ˜ƒ
Let me know if that works for you.

from flutter-custom-refresh-indicator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.