Unverified Commit cb4147cf authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Doc Improvements (#53377)

parent 183b3c32
...@@ -2013,8 +2013,9 @@ class CustomMultiChildLayout extends MultiChildRenderObjectWidget { ...@@ -2013,8 +2013,9 @@ class CustomMultiChildLayout extends MultiChildRenderObjectWidget {
/// ///
/// If given a child, this widget forces its child to have a specific width /// If given a child, this widget forces its child to have a specific width
/// and/or height (assuming values are permitted by this widget's parent). If /// and/or height (assuming values are permitted by this widget's parent). If
/// either the width or height is null, this widget will size itself to match /// either the width or height is null, this widget will try to size itself to
/// the child's size in that dimension. /// match the child's size in that dimension. If the child's size depends on the
/// size of its parent, the height and width must be provided.
/// ///
/// If not given a child, [SizedBox] will try to size itself as close to the /// If not given a child, [SizedBox] will try to size itself as close to the
/// specified height and width as possible given the parent's constraints. If /// specified height and width as possible given the parent's constraints. If
......
...@@ -32,6 +32,47 @@ import 'ticker_provider.dart'; ...@@ -32,6 +32,47 @@ import 'ticker_provider.dart';
/// (e.g., Android) that commonly use this type of overscroll indication. /// (e.g., Android) that commonly use this type of overscroll indication.
/// ///
/// In a [MaterialApp], the edge glow color is the [ThemeData.accentColor]. /// In a [MaterialApp], the edge glow color is the [ThemeData.accentColor].
///
/// When building a [CustomScrollView] with a [GlowingOverscrollIndicator], the
/// indicator will apply to the entire scrollable area, regardless of what
/// slivers the CustomScrollView contains.
///
/// For example, if your CustomScrollView contains a SliverAppBar in the first
/// position, the GlowingOverscrollIndicator will overlay the SliverAppBar. To
/// manipulate the position of the GlowingOverscrollIndicator in this case, use
/// a [NestedScrollView].
///
/// {@tool dartpad --template=stateless_widget_scaffold}
///
/// This example demonstrates how to use a [NestedScrollView] to manipulate the
/// placement of a [GlowingOverscrollIndicator] when building a
/// [CustomScrollView]. Drag the scrollable to see the bounds of the overscroll
/// indicator.
///
/// ```dart
/// Widget build(BuildContext context) {
/// return NestedScrollView(
/// headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
/// return <Widget>[
/// SliverAppBar(title: Text('Custom NestedScrollViews')),
/// ];
/// },
/// body: CustomScrollView(
/// slivers: <Widget>[
/// SliverToBoxAdapter(
/// child: Container(
/// color: Colors.amberAccent,
/// height: 100,
/// child: Center(child: Text('Glow all day!')),
/// ),
/// ),
/// SliverFillRemaining(child: FlutterLogo()),
/// ],
/// ),
/// );
/// }
/// ```
/// {@end-tool}
class GlowingOverscrollIndicator extends StatefulWidget { class GlowingOverscrollIndicator extends StatefulWidget {
/// Creates a visual indication that a scroll view has overscrolled. /// Creates a visual indication that a scroll view has overscrolled.
/// ///
......
...@@ -205,7 +205,8 @@ abstract class ScrollView extends StatelessWidget { ...@@ -205,7 +205,8 @@ abstract class ScrollView extends StatelessWidget {
/// ///
/// Children after [center] will be placed in the [axisDirection] relative to /// Children after [center] will be placed in the [axisDirection] relative to
/// the [center]. Children before [center] will be placed in the opposite of /// the [center]. Children before [center] will be placed in the opposite of
/// the [axisDirection] relative to the [center]. /// the [axisDirection] relative to the [center]. This makes the [center] the
/// inflection point of the growth direction.
/// ///
/// The [center] must be the key of one of the slivers built by [buildSlivers]. /// The [center] must be the key of one of the slivers built by [buildSlivers].
/// ///
......
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