Commit b71d7694 authored by Matt Perry's avatar Matt Perry Committed by GitHub

Prevent Hero transition for AppBar on Pesto recipe page. (#5760)

BUG=https://github.com/flutter/flutter/issues/5351
parent d2fda677
......@@ -317,6 +317,7 @@ class _RecipePageState extends State<RecipePage> {
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
final GlobalKey<ScrollableState> _scrollableKey = new GlobalKey<ScrollableState>();
final TextStyle menuItemStyle = new PestoStyle(fontSize: 15.0, color: Colors.black54, height: 24.0/15.0);
final Object _disableHeroTransition = new Object();
double _getAppBarHeight(BuildContext context) => MediaQuery.of(context).size.height * 0.3;
......@@ -327,6 +328,7 @@ class _RecipePageState extends State<RecipePage> {
scrollableKey: _scrollableKey,
appBarBehavior: AppBarBehavior.scroll,
appBar: new AppBar(
heroTag: _disableHeroTransition,
expandedHeight: _getAppBarHeight(context),
backgroundColor: Colors.transparent,
elevation: 0,
......@@ -346,9 +348,6 @@ class _RecipePageState extends State<RecipePage> {
]
)
],
// This empty space keeps the app bar from moving until the screen is
// scrolled at least _getAppBarHeight().
flexibleSpace: new Container()
),
body: _buildContainer(context)
);
......
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