From 0b7845a5acfc79ea875985516deb6dbc172717b8 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 1 Mar 2017 11:04:42 -0800 Subject: [PATCH] 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 --- .../lib/src/material/refresh_indicator.dart | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/refresh_indicator.dart b/packages/flutter/lib/src/material/refresh_indicator.dart index 47fa41e804..4704393d4a 100644 --- a/packages/flutter/lib/src/material/refresh_indicator.dart +++ b/packages/flutter/lib/src/material/refresh_indicator.dart @@ -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: ///