Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b71d7694
Commit
b71d7694
authored
Sep 08, 2016
by
Matt Perry
Committed by
GitHub
Sep 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent Hero transition for AppBar on Pesto recipe page. (#5760)
BUG=
https://github.com/flutter/flutter/issues/5351
parent
d2fda677
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
pesto_demo.dart
examples/flutter_gallery/lib/demo/pesto_demo.dart
+2
-3
No files found.
examples/flutter_gallery/lib/demo/pesto_demo.dart
View file @
b71d7694
...
...
@@ -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
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment