Skip to content

Conversation

@HansMuller
Copy link
Contributor

Adds a RefreshIndicator widget that supports the Material "swipe to refresh" idiom.

Added an over-scroll gallery demo that shows this widget and the existing OverscrollIndicator.

This initial version has some limitations:

  • It always appears at the top and bottom of its scrollable. This should be configurable and it should default to just appearing at the top.
  • During the drag phase, the refresh indicator should only animate when the drag is moving.
  • While the refresh callback is running, the refresh indicator's arrowhead shouldn't appear.
  • It should be possible for the refresh callback to update the indicator with its actual progress.
  • The refresh indicator should disappear "when the user navigates away from the refreshing content".
  • Currently the duration of overscrolls is extended because all drags end in a fling. Both OverscrollIndicator and RefreshIndicator need to cause the Scrollable's ScrollBehavior to set overscroll fling velocities to zero.

See https://www.google.com/design/spec/patterns/swipe-to-refresh.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after period

@Hixie
Copy link
Contributor

Hixie commented Apr 15, 2016

This needs tests.

@Hixie
Copy link
Contributor

Hixie commented Apr 15, 2016

LGTM with the above comments addressed.

@HansMuller HansMuller merged commit c4ae13e into flutter:master Apr 16, 2016
@HansMuller HansMuller deleted the refresh_indicator branch April 16, 2016 01:39
@sethladd sethladd mentioned this pull request Apr 18, 2016
8 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Hixie added a commit to Hixie/flutter that referenced this pull request Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants