[Material] Inline the single Theme.of(context) call in BAB (#26765)

This commit is contained in:
MH Johnson 2019-01-18 14:13:14 -05:00 committed by GitHub
parent b531b8f507
commit 5d0c1b86ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,6 @@ class _BottomAppBarState extends State<BottomAppBar> {
@override
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
final BottomAppBarTheme babTheme = BottomAppBarTheme.of(context);
final NotchedShape notchedShape = widget.shape ?? babTheme.shape;
final CustomClipper<Path> clipper = notchedShape != null
@ -129,7 +128,7 @@ class _BottomAppBarState extends State<BottomAppBar> {
return PhysicalShape(
clipper: clipper,
elevation: widget.elevation ?? babTheme.elevation ?? _defaultElevation,
color: widget.color ?? babTheme.color ?? theme.bottomAppBarColor,
color: widget.color ?? babTheme.color ?? Theme.of(context).bottomAppBarColor,
clipBehavior: widget.clipBehavior,
child: Material(
type: MaterialType.transparency,