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
3af97d22
Unverified
Commit
3af97d22
authored
Aug 06, 2020
by
chunhtai
Committed by
GitHub
Aug 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the flexible space bar to still create a rendering object even if… (#62690)
parent
6ab558d8
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
278 additions
and
34 deletions
+278
-34
flexible_space_bar.dart
packages/flutter/lib/src/material/flexible_space_bar.dart
+34
-34
flexible_space_bar_test.dart
packages/flutter/test/material/flexible_space_bar_test.dart
+244
-0
No files found.
packages/flutter/lib/src/material/flexible_space_bar.dart
View file @
3af97d22
...
...
@@ -303,7 +303,6 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
const
double
fadeEnd
=
1.0
;
assert
(
fadeStart
<=
fadeEnd
);
final
double
opacity
=
1.0
-
Interval
(
fadeStart
,
fadeEnd
).
transform
(
t
);
if
(
opacity
>
0.0
)
{
double
height
=
settings
.
maxExtent
;
// StretchMode.zoomBackground
...
...
@@ -311,13 +310,15 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
constraints
.
maxHeight
>
height
)
{
height
=
constraints
.
maxHeight
;
}
children
.
add
(
Positioned
(
top:
_getCollapsePadding
(
t
,
settings
),
left:
0.0
,
right:
0.0
,
height:
height
,
child:
Opacity
(
// IOS is relying on this semantics node to correctly traverse
// through the app bar when it is collapsed.
alwaysIncludeSemantics:
true
,
opacity:
opacity
,
child:
widget
.
background
,
),
...
...
@@ -340,7 +341,6 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
));
}
}
}
// title
if
(
widget
.
title
!=
null
)
{
...
...
packages/flutter/test/material/flexible_space_bar_test.dart
View file @
3af97d22
This diff is collapsed.
Click to expand it.
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