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
90ca8152
Unverified
Commit
90ca8152
authored
Apr 21, 2018
by
xster
Committed by
GitHub
Apr 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make bottom app bar safe area friendly (#16820)
parent
2eb290e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
bottom_app_bar.dart
packages/flutter/lib/src/material/bottom_app_bar.dart
+3
-1
bottom_app_bar_test.dart
packages/flutter/test/material/bottom_app_bar_test.dart
+24
-0
No files found.
packages/flutter/lib/src/material/bottom_app_bar.dart
View file @
90ca8152
...
...
@@ -106,7 +106,9 @@ class _BottomAppBarState extends State<BottomAppBar> {
color:
widget
.
color
??
Theme
.
of
(
context
).
bottomAppBarColor
,
child:
new
Material
(
type:
MaterialType
.
transparency
,
child:
widget
.
child
,
child:
widget
.
child
==
null
?
null
:
new
SafeArea
(
child:
widget
.
child
),
),
);
}
...
...
packages/flutter/test/material/bottom_app_bar_test.dart
View file @
90ca8152
...
...
@@ -125,6 +125,30 @@ void main() {
//
// Cannot test this before https://github.com/flutter/flutter/pull/14368
// as there is no way to make the FAB and BAB overlap.
testWidgets
(
'observes safe area'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
new
MaterialApp
(
home:
const
MediaQuery
(
data:
const
MediaQueryData
(
padding:
const
EdgeInsets
.
all
(
50.0
),
),
child:
const
Scaffold
(
bottomNavigationBar:
const
BottomAppBar
(
child:
const
Center
(
child:
const
Text
(
'safe'
),
),
),
),
),
),
);
expect
(
tester
.
getBottomLeft
(
find
.
widgetWithText
(
Center
,
'safe'
)),
const
Offset
(
50.0
,
550.0
),
);
});
}
// The bottom app bar clip path computation is only available at paint time.
...
...
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