You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Match CupertinoSliverRefreshControl to have a progressive ring instead of a growing down arrow #29159
changed the title [-]CupertinoSliverRefreshControl: match indicator style with UIRefreshControl[/-][+]Match CupertinoSliverRefreshControl to have a progressive ring instead of a growing down arrow[/+]on Mar 14, 2019
For example, the following shows the spinner immediately instead of a down arrow. Note that this is most definitely NOT what iOS does and still doesn't feel quite right when you see it in action, but it is far less foreign than showing a down arrow.
@xster not sure if anyone has already started work on this... if not, I thought I'd have a go at submitting a PR based on the general concept in the gist above.
Conceptually, there are few states that the activity indicator can be in (see the _buildIndicator() function in the gist):
Not spinning with a fractional number of ticks being drawn - This is the state as the user pulls down
Spinning at normal size - This is the state while the refresh is occurring
Spinning with shrinking size - This is the state as the indicator shrinks after the pull has been released
My initial implementation above provides a separate implementation for the 1st case, however, it does so at the expense of some code duplication between my _DraggingActivityIndicator and Flutter's _CupertinoActivityIndicator.
So, I've got a couple of choices...
I can try to change the existing _CupertinoActivityIndicator to be able to support both spinning and non-spinning modes (which is going to make that class a lot more complicated),
I can use a separate class like I currently am... however, if this class is to be referenced from refresh.dart then it is either going to have to be:
implemented in refresh.dart - which causes problems because a bunch of the color/width constants it needs are privately defined in activity_indicator.dart, or
implemented in activity_indicator.dart but be marked as public - this is easier, but we've now got a publicly referencable class that should only be used internally which seems less than ideal.
Any thoughts or guidance you might have would appreciated. Thanks a lot.
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 flutter doctor -v and a minimal reproduction of the issue.
Activity
xster commentedon Mar 11, 2019
I'll dupe it into #16069. Please let me know if the intended issue was incorrect.
pd4d10 commentedon Mar 12, 2019
@xster Yes, thanks for the quick reply.
In addition, the current icon is an arrow, while iOS native icon is a circular progress indicator. Would it be matched in the future?
xster commentedon Mar 14, 2019
Ah sure, I'll re-open this bug but scope it to the visuals of the indicator specifically.
[-]CupertinoSliverRefreshControl: match indicator style with UIRefreshControl[/-][+]Match CupertinoSliverRefreshControl to have a progressive ring instead of a growing down arrow[/+]genert commentedon Jul 17, 2019
Any updates?
realvotum commentedon Aug 18, 2019
Any progress so far?
genert commentedon Dec 6, 2019
Bump
TahaTesser commentedon Mar 30, 2020
Issue still exist on
edwardaux commentedon May 14, 2020
EDIT: Don't use this. My next comment has a much better implementation.
While we're waiting for this to be fixed, a very hacky workaround is to create an alternate implementation to the default one that can be found here:
flutter/packages/flutter/lib/src/cupertino/refresh.dart
Line 365 in 449f4a6
For example, the following shows the spinner immediately instead of a down arrow. Note that this is most definitely NOT what iOS does and still doesn't feel quite right when you see it in action, but it is far less foreign than showing a down arrow.
edwardaux commentedon May 15, 2020
There's quite a bit that goes on in the Apple implementation:
I've put together a much better implementation that covers most of this that you can see here: https://gist.github.com/edwardaux/eb481793aff880b8917d1445000058ad
edwardaux commentedon May 22, 2020
@xster not sure if anyone has already started work on this... if not, I thought I'd have a go at submitting a PR based on the general concept in the gist above.
Conceptually, there are few states that the activity indicator can be in (see the
_buildIndicator()function in the gist):My initial implementation above provides a separate implementation for the 1st case, however, it does so at the expense of some code duplication between my
_DraggingActivityIndicatorand Flutter's_CupertinoActivityIndicator.So, I've got a couple of choices...
_CupertinoActivityIndicatorto be able to support both spinning and non-spinning modes (which is going to make that class a lot more complicated),refresh.dartthen it is either going to have to be:refresh.dart- which causes problems because a bunch of the color/width constants it needs are privately defined inactivity_indicator.dart, oractivity_indicator.dartbut be marked as public - this is easier, but we've now got a publicly referencable class that should only be used internally which seems less than ideal.Any thoughts or guidance you might have would appreciated. Thanks a lot.
edwardaux commentedon Jun 23, 2020
As you can see from the above, #58392 has been merged to resolve this.
LongCatIsLooong commentedon Jun 30, 2020
Closing as the fix is merged. Thank you @edwardaux!
github-actions commentedon Aug 19, 2021
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
flutter doctor -vand a minimal reproduction of the issue.