Unverified Commit 4d2ddb91 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Doc Updates (#60222)

parent d9902a54
......@@ -448,12 +448,25 @@ class RangeMaintainingScrollPhysics extends ScrollPhysics {
///
/// This is the behavior typically seen on iOS.
///
/// [BouncingScrollPhysics] by itself will not create an overscroll effect if
/// the contents of the scroll view do not extend beyond the size of the
/// viewport. To create the overscroll and bounce effect regardless of the
/// length of your scroll view, combine with [AlwaysScrollableScrollPhysics].
///
/// {@tool snippet}
/// ```dart
/// BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics())
/// ```
/// (@end-tool}
///
/// See also:
///
/// * [ScrollConfiguration], which uses this to provide the default
/// scroll behavior on iOS.
/// * [ClampingScrollPhysics], which is the analogous physics for Android's
/// clamping behavior.
/// * [ScrollPhysics], for more examples of combining [ScrollPhysics] objects
/// of different types to get the desired scroll physics.
class BouncingScrollPhysics extends ScrollPhysics {
/// Creates scroll physics that bounce back from the edge.
const BouncingScrollPhysics({ ScrollPhysics parent }) : super(parent: parent);
......
......@@ -188,7 +188,10 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding {
/// The [hasScrollBody] flag indicates whether the sliver's child has a
/// scrollable body. This value is never null, and defaults to true. A common
/// example of this use is a [NestedScrollView]. In this case, the sliver will
/// size its child to fill the maximum available extent.
/// size its child to fill the maximum available extent. [SliverFillRemaining]
/// will not constrain the scrollable area, as it could potentially have an
/// infinite depth. This is also true for use cases such as a [ScrollView] when
/// [ScrollView.shrinkwrap] is true.
///
/// ### When [SliverFillRemaining] does not have a scrollable child
///
......@@ -347,7 +350,10 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding {
/// // fillOverscroll only changes the behavior of your layout when applied
/// // to Scrollables that allow for overscroll. BouncingScrollPhysics are
/// // one example, which are provided by default on the iOS platform.
/// physics: BouncingScrollPhysics(),
/// // BouncingScrollPhysics is combined with AlwaysScrollableScrollPhysics
/// // to allow for the overscroll, regardless of the depth of the
/// // scrollable.
/// physics: BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
/// slivers: <Widget>[
/// SliverToBoxAdapter(
/// child: Container(
......
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