@@ -34,31 +34,35 @@ class BottomAppBarTheme with Diagnosticable {
34
34
this .shape,
35
35
this .height,
36
36
this .surfaceTintColor,
37
+ this .padding,
37
38
});
38
39
39
- /// Default value for [BottomAppBar.color] .
40
+ /// Overrides the default value for [BottomAppBar.color] .
40
41
///
41
42
/// If null, [BottomAppBar] uses [ThemeData.bottomAppBarColor] .
42
43
final Color ? color;
43
44
44
- /// Default value for [BottomAppBar.elevation] .
45
+ /// Overrides the default value for [BottomAppBar.elevation] .
45
46
final double ? elevation;
46
47
47
- /// Default value for [BottomAppBar.shape] .
48
+ /// Overrides the default value for [BottomAppBar.shape] .
48
49
final NotchedShape ? shape;
49
50
50
- /// Default value for [BottomAppBar.height] .
51
+ /// Overrides the default value for [BottomAppBar.height] .
51
52
///
52
53
/// If null, [BottomAppBar] height will be the minimum on the non material 3.
53
54
final double ? height;
54
55
55
- /// Default value for [BottomAppBar.surfaceTintColor] .
56
+ /// Overrides the default value for [BottomAppBar.surfaceTintColor] .
56
57
///
57
58
/// If null, [BottomAppBar] will not display an overlay color.
58
59
///
59
60
/// See [Material.surfaceTintColor] for more details.
60
61
final Color ? surfaceTintColor;
61
62
63
+ /// Overrides the default value for [BottomAppBar.padding] .
64
+ final EdgeInsetsGeometry ? padding;
65
+
62
66
/// Creates a copy of this object but with the given fields replaced with the
63
67
/// new values.
64
68
BottomAppBarTheme copyWith ({
@@ -67,13 +71,15 @@ class BottomAppBarTheme with Diagnosticable {
67
71
NotchedShape ? shape,
68
72
double ? height,
69
73
Color ? surfaceTintColor,
74
+ EdgeInsetsGeometry ? padding,
70
75
}) {
71
76
return BottomAppBarTheme (
72
77
color: color ?? this .color,
73
78
elevation: elevation ?? this .elevation,
74
79
shape: shape ?? this .shape,
75
80
height: height ?? this .height,
76
81
surfaceTintColor: surfaceTintColor ?? this .surfaceTintColor,
82
+ padding: padding ?? this .padding,
77
83
);
78
84
}
79
85
@@ -94,7 +100,8 @@ class BottomAppBarTheme with Diagnosticable {
94
100
elevation: lerpDouble (a? .elevation, b? .elevation, t),
95
101
shape: t < 0.5 ? a? .shape : b? .shape,
96
102
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),
98
105
);
99
106
}
100
107
@@ -105,6 +112,7 @@ class BottomAppBarTheme with Diagnosticable {
105
112
shape,
106
113
height,
107
114
surfaceTintColor,
115
+ padding,
108
116
);
109
117
110
118
@override
@@ -120,7 +128,8 @@ class BottomAppBarTheme with Diagnosticable {
120
128
&& other.elevation == elevation
121
129
&& other.shape == shape
122
130
&& other.height == height
123
- && other.surfaceTintColor == surfaceTintColor;
131
+ && other.surfaceTintColor == surfaceTintColor
132
+ && other.padding == padding;
124
133
}
125
134
126
135
@override
@@ -131,5 +140,6 @@ class BottomAppBarTheme with Diagnosticable {
131
140
properties.add (DiagnosticsProperty <NotchedShape >('shape' , shape, defaultValue: null ));
132
141
properties.add (DiagnosticsProperty <double >('height' , height, defaultValue: null ));
133
142
properties.add (ColorProperty ('surfaceTintColor' , surfaceTintColor, defaultValue: null ));
143
+ properties.add (DiagnosticsProperty <EdgeInsetsGeometry >('padding' , padding, defaultValue: null ));
134
144
}
135
145
}
0 commit comments