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
da0a3a27
Unverified
Commit
da0a3a27
authored
May 15, 2019
by
MH Johnson
Committed by
GitHub
May 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Material] Remove inherit: false on default TextStyle in bottom navigation bar (#32727)
parent
30fed3a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
bottom_navigation_bar.dart
packages/flutter/lib/src/material/bottom_navigation_bar.dart
+1
-1
bottom_navigation_bar_test.dart
...ges/flutter/test/material/bottom_navigation_bar_test.dart
+2
-2
No files found.
packages/flutter/lib/src/material/bottom_navigation_bar.dart
View file @
da0a3a27
...
...
@@ -778,7 +778,7 @@ class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerPr
// If the given [TextStyle] has a non-null `fontSize`, it should be used.
// Otherwise, the [selectedFontSize] parameter should be used.
static
TextStyle
_effectiveTextStyle
(
TextStyle
textStyle
,
double
fontSize
)
{
textStyle
??=
const
TextStyle
(
inherit:
false
);
textStyle
??=
const
TextStyle
();
// Prefer the font size on textStyle if present.
return
textStyle
.
fontSize
==
null
?
textStyle
.
copyWith
(
fontSize:
fontSize
)
:
textStyle
;
}
...
...
packages/flutter/test/material/bottom_navigation_bar_test.dart
View file @
da0a3a27
...
...
@@ -106,10 +106,10 @@ void main() {
final
TextStyle
unselectedIcon
=
_iconStyle
(
tester
,
Icons
.
access_alarm
);
expect
(
selectedFontStyle
.
color
,
equals
(
primaryColor
));
expect
(
selectedFontStyle
.
fontSize
,
selectedFontSize
);
expect
(
selectedFontStyle
.
fontWeight
,
isNull
);
expect
(
selectedFontStyle
.
fontWeight
,
equals
(
FontWeight
.
w400
)
);
expect
(
selectedFontStyle
.
height
,
isNull
);
expect
(
unselectedFontStyle
.
color
,
equals
(
captionColor
));
expect
(
unselectedFontStyle
.
fontWeight
,
isNull
);
expect
(
unselectedFontStyle
.
fontWeight
,
equals
(
FontWeight
.
w400
)
);
expect
(
unselectedFontStyle
.
height
,
isNull
);
// Unselected label has a font size of 14 but is scaled down to be font size 12.
expect
(
...
...
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