-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CupertinoSliverRefreshControll not work on Android #21820
Comments
You need to set CupertinoRefreshControl(
builder: Theme.of(context).platform == TargetPlatform.iOS
? buildAppleRefreshIndicator
: buildAndroidRefreshIndicator,
onRefresh: ...,
) I did this on my app and here's a gist with both refresh indicator methods. |
thank you! all works now |
@gildaswise Reopen. If SliverList have only one item refresh indicator not work(on iOS and Android too) |
@AndreyTCR Is the List occupying all available space or is it only with the item's height? There might not be enough space for the RefreshIndicator to appear, or you are pulling from the middle of the screen instead of right in your list |
@gildaswise problem, i think, on SliverList height. If we have 1 item on it then bounce not work correctly, but if we have more items(more i mean Sliverlist bigger then viewport) then all work correctly. |
I changed the builder of ----2018/10/22 update---- You may not be able to swipe on an android device when physics is AlwaysScrollableScrollPhysics. But there's a pit here, you can't do pull-down refresh without the sub controller filling the screen if you class RefreshScrollPhysics extends BouncingScrollPhysics {
const RefreshScrollPhysics({ScrollPhysics parent}) : super(parent: parent);
@override
RefreshScrollPhysics applyTo(ScrollPhysics ancestor) {
return RefreshScrollPhysics(parent: buildParent(ancestor));
}
@override
bool shouldAcceptUserOffset(ScrollMetrics position) {
return true;
}
} |
FYI: I just found out the official example |
I think the fix here is documentation. Since there are no specs for how an Android + Material native scroll overscroll should behave, we should just offer the components but also make it clear how users can compose the Cupertino components together for use on Android. Specifically:
|
Extracted #30466 from this bug. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
CupertinoSliverRefreshControll not work on Android. On iOS works perfectly
The text was updated successfully, but these errors were encountered: