aagarwal1012 / Liquid-Pull-To-Refresh

🔁 A custom refresh indicator for flutter.
https://pub.dev/packages/liquid_pull_to_refresh
MIT License
1.24k stars 92 forks source link

physics: ClampingScrollPhysics() not working #26

Closed sooxt98 closed 4 years ago

sooxt98 commented 4 years ago

ezgif-5-be24d7f7f75e

w4mxl commented 4 years ago

@aagarwal1012 Can you consider fixing this problem? Thanks.

AadumKhor commented 4 years ago

Hi @sooxt98 . I am unable to replicate this. I have tried ListView.builder, ListView and also CustomScrollView with ClampingScrollPhysics and none of them seem to have a problem.

Closing this issue.

sooxt98 commented 4 years ago

@AadumKhor try to scroll up and instantly scroll down

AadumKhor commented 4 years ago

@sooxt98

This is the code I am testing with. You can test it yourself by removing StreamBuilder from the tree.

    return Scaffold(
        appBar: new AppBar(
          title: Text('Example App'),
        ),
        body: LiquidPullToRefresh(
          onRefresh: _handleRefresh,
          springAnimationDurationInMilliseconds: 1000,
          child: StreamBuilder<int>(
              stream: counterStream,
              builder: (context, snapshot) {
                return ListView.builder(
                    itemCount: _items.length,
                    physics: ClampingScrollPhysics(),
                    itemBuilder: (context, index) {
                      return ListTile(
                        title: Text(_items[index]),
                        subtitle: Text(snapshot.data.toString()),
                      );
                    });
              }),
        ));

This is the result on the emulator. clampin_gif_1

Replacing the LiquidPullToRefresh with RefreshIndicator the result is this.

clampin_gif_2

The behavior seems to be almost identical. They first clamp the scroll and on second drag the refresh part comes in.

If you have the code you tested this on please mention it here so that I can further understand the issue.

sooxt98 commented 3 years ago

Hi @AadumKhor In this case , is diff ; its iOS behaviour that sometimes makes user cant trigger the pull to refresh . As u can see in that gif, I can simply keep pulling down the card without triggering the pulltorefresh

https://youtu.be/rEH0ErPvuW4