aagarwal1012/Liquid-Pull-To-Refresh

physics: ClampingScrollPhysics() not working

sooxt98 opened this issue · 5 comments

w4mxl commented

@aagarwal1012 Can you consider fixing this problem? Thanks.

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.

@AadumKhor try to scroll up and instantly scroll down

@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.

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