Skip to content

When I just tap on the screen, the refresh indicator appears unexpectedly #62

Open
@MrTadeu

Description

@MrTadeu

Hello,

I've been working with the CheckMarkIndicator example from your repository (there are really awesome exemples 🤩, btw), and I have encountered an issue.

For context, I set the edgeOffset like this:

edgeOffset: AppBar().preferredSize.height + MediaQuery.of(context).padding.top + 24;

To position the indicator where I want it. However, whenever I simply tap on the screen, the refresh indicator appears briefly.

Here are the logs from debugging:
I/flutter ( 6309): Controller value: 0.0
I/flutter ( 6309): Controller state: IndicatorState.dragging

I initially tried to adjust the trigger conditions and triggerMode, but those changes did not resolve the issue. As a workaround, I updated the notificationPredicate to:

notificationPredicate: (notification) {
return (notification is ScrollUpdateNotification ||
          notification is ScrollStartNotification ||
          notification is ScrollEndNotification) &&
         notification.metrics.pixels.abs() > 0.0;
},

This change provides the correct boolean value during debugging (alternating between true and false as expected), but the indicator stops showing up and it doesn't works anymore - perhaps it's only constructed once and not rebuilt properly. I even tried to transforming it into something likebool statement = (notification is ...) and then wrapped in a setState.

Here’s a visual of the problem:
Tap-problem

Is there a known fix or any recommendations for properly handling the refresh indicator without it appearing unexpectedly on tap?

Thank you a lot in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionQuestion about the package

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions