From 1fff10500fe347ca699765525ff02c01e7bf91ca Mon Sep 17 00:00:00 2001 From: Pragya Date: Tue, 28 Jul 2020 22:46:13 +0530 Subject: [PATCH] Added expandedHeight in flexibleSpace and flexibleSpaceBar (#61710) --- packages/flutter/lib/src/material/app_bar.dart | 3 +++ packages/flutter/lib/src/material/flexible_space_bar.dart | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/app_bar.dart b/packages/flutter/lib/src/material/app_bar.dart index b82d5303e5..d26abdce6a 100644 --- a/packages/flutter/lib/src/material/app_bar.dart +++ b/packages/flutter/lib/src/material/app_bar.dart @@ -1123,6 +1123,9 @@ class SliverAppBar extends StatefulWidget { /// This widget is stacked behind the toolbar and the tab bar. It's height will /// be the same as the app bar's overall height. /// + /// When using [SliverAppBar.flexibleSpace], the [SliverAppBar.expandedHeight] + /// must be large enough to accommodate the [SliverAppBar.flexibleSpace] widget. + /// /// Typically a [FlexibleSpaceBar]. See [FlexibleSpaceBar] for details. final Widget flexibleSpace; diff --git a/packages/flutter/lib/src/material/flexible_space_bar.dart b/packages/flutter/lib/src/material/flexible_space_bar.dart index 9759398946..57137c651f 100644 --- a/packages/flutter/lib/src/material/flexible_space_bar.dart +++ b/packages/flutter/lib/src/material/flexible_space_bar.dart @@ -41,10 +41,13 @@ enum StretchMode { /// The part of a material design [AppBar] that expands, collapses, and /// stretches. /// -/// Most commonly used in in the [SliverAppBar.flexibleSpace] field, a flexible +/// Most commonly used in the [SliverAppBar.flexibleSpace] field, a flexible /// space bar expands and contracts as the app scrolls so that the [AppBar] /// reaches from the top of the app to the top of the scrolling contents of the -/// app. Furthermore is included functionality for stretch behavior. When +/// app. When using [SliverAppBar.flexibleSpace], the [SliverAppBar.expandedHeight] +/// must be large enough to accommodate the [SliverAppBar.flexibleSpace] widget. +/// +/// Furthermore is included functionality for stretch behavior. When /// [SliverAppBar.stretch] is true, and your [ScrollPhysics] allow for /// overscroll, this space will stretch with the overscroll. ///