@@ -34,31 +34,35 @@ class BottomAppBarTheme with Diagnosticable {
3434 this .shape,
3535 this .height,
3636 this .surfaceTintColor,
37+ this .padding,
3738 });
3839
39- /// Default value for [BottomAppBar.color] .
40+ /// Overrides the default value for [BottomAppBar.color] .
4041 ///
4142 /// If null, [BottomAppBar] uses [ThemeData.bottomAppBarColor] .
4243 final Color ? color;
4344
44- /// Default value for [BottomAppBar.elevation] .
45+ /// Overrides the default value for [BottomAppBar.elevation] .
4546 final double ? elevation;
4647
47- /// Default value for [BottomAppBar.shape] .
48+ /// Overrides the default value for [BottomAppBar.shape] .
4849 final NotchedShape ? shape;
4950
50- /// Default value for [BottomAppBar.height] .
51+ /// Overrides the default value for [BottomAppBar.height] .
5152 ///
5253 /// If null, [BottomAppBar] height will be the minimum on the non material 3.
5354 final double ? height;
5455
55- /// Default value for [BottomAppBar.surfaceTintColor] .
56+ /// Overrides the default value for [BottomAppBar.surfaceTintColor] .
5657 ///
5758 /// If null, [BottomAppBar] will not display an overlay color.
5859 ///
5960 /// See [Material.surfaceTintColor] for more details.
6061 final Color ? surfaceTintColor;
6162
63+ /// Overrides the default value for [BottomAppBar.padding] .
64+ final EdgeInsetsGeometry ? padding;
65+
6266 /// Creates a copy of this object but with the given fields replaced with the
6367 /// new values.
6468 BottomAppBarTheme copyWith ({
@@ -67,13 +71,15 @@ class BottomAppBarTheme with Diagnosticable {
6771 NotchedShape ? shape,
6872 double ? height,
6973 Color ? surfaceTintColor,
74+ EdgeInsetsGeometry ? padding,
7075 }) {
7176 return BottomAppBarTheme (
7277 color: color ?? this .color,
7378 elevation: elevation ?? this .elevation,
7479 shape: shape ?? this .shape,
7580 height: height ?? this .height,
7681 surfaceTintColor: surfaceTintColor ?? this .surfaceTintColor,
82+ padding: padding ?? this .padding,
7783 );
7884 }
7985
@@ -94,7 +100,8 @@ class BottomAppBarTheme with Diagnosticable {
94100 elevation: lerpDouble (a? .elevation, b? .elevation, t),
95101 shape: t < 0.5 ? a? .shape : b? .shape,
96102 height: lerpDouble (a? .height, b? .height, t),
97- surfaceTintColor: Color .lerp (a? .color, b? .color, t),
103+ surfaceTintColor: Color .lerp (a? .surfaceTintColor, b? .surfaceTintColor, t),
104+ padding: EdgeInsetsGeometry .lerp (a? .padding, b? .padding, t),
98105 );
99106 }
100107
@@ -105,6 +112,7 @@ class BottomAppBarTheme with Diagnosticable {
105112 shape,
106113 height,
107114 surfaceTintColor,
115+ padding,
108116 );
109117
110118 @override
@@ -120,7 +128,8 @@ class BottomAppBarTheme with Diagnosticable {
120128 && other.elevation == elevation
121129 && other.shape == shape
122130 && other.height == height
123- && other.surfaceTintColor == surfaceTintColor;
131+ && other.surfaceTintColor == surfaceTintColor
132+ && other.padding == padding;
124133 }
125134
126135 @override
@@ -131,5 +140,6 @@ class BottomAppBarTheme with Diagnosticable {
131140 properties.add (DiagnosticsProperty <NotchedShape >('shape' , shape, defaultValue: null ));
132141 properties.add (DiagnosticsProperty <double >('height' , height, defaultValue: null ));
133142 properties.add (ColorProperty ('surfaceTintColor' , surfaceTintColor, defaultValue: null ));
143+ properties.add (DiagnosticsProperty <EdgeInsetsGeometry >('padding' , padding, defaultValue: null ));
134144 }
135145}
0 commit comments