Commit 0b7845a5 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Recommend using AlwaysScrollableScrollPhysics with RefreshIndicator (#8498)

Using these physics avoids a problem whereby the scroll view isn't scrollable
due to lack of content and therefore cannot trigger the refresh indicator.

Fixes #8432
parent fcf67408
......@@ -54,7 +54,20 @@ enum _RefreshIndicatorMode {
/// scrollable's contents and then complete the [Future] it returns. The refresh
/// indicator disappears after the callback's [Future] has completed.
///
/// A [RefreshIndicator] can only be used with a vertical scroll view (the xxxxxxx.
/// If the [Scrollable] might not have enough content to overscroll, consider
/// settings its `physics` property to [AlwaysScrollableScrollPhysics]:
///
/// ```dart
/// new ListView(
/// physics: const AlwaysScrollableScrollPhysics(),
/// children: ...
// )
/// ```
///
/// Using [AlwaysScrollableScrollPhysics] will ensure that the scroll view is
/// always scrollable and, therefore, can trigger the [RefreshIndicator].
///
/// A [RefreshIndicator] can only be used with a vertical scroll view.
///
/// See also:
///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment