aagarwal1012 / aagarwal1012/Liquid-Pull-To-Refresh

Can't pull to refresh when swipe down on non-scrollable objects

Open
#56 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
1.3k
Forks
91
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The swipe refresh only works for a scrollable object like ListView, SingleChildScrollView. And if "swipe down" performed on a non-scrollable object (Container, Text), the LiquidPullToRefresh not worked.

**To Reproduce**
Steps to reproduce the behavior:
1. Use this code: https://gist.github.com/IkhwanSI13/c38089a2ef6853b837e10a5988ec6475
2. Run the code
3. Swipe down at Container Text

**Expected behavior**
the onRefresh function of LiquidPullToRefresh runs when swiping down at Container Text.

**Flutter:**
- version: 1.22.6
- channel: stable

**Dart:**
- version: 2.10.5

**Additional context**
- liquid_pull_to_refresh: ^2.0.0

Contributor guide

Open the contributing guide

Research direction

The issue is in the liquid_pull_to_refresh package. Start by examining the gesture detection logic in the main widget, likely in lib/liquid_pull_to_refresh.dart. The provided gist shows a minimal reproduction. Test by running the example and verifying that swipe down on a non-scrollable Container does not trigger onRefresh. Look for conditions that check scrollability. Done when the refresh works on any widget, not just scrollable ones.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
frontend, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.