decodeBottomAppBarTheme static method
Decodes the given value
to an BottomAppBarTheme. This expects the
given value
to follow the structure below:
{
"color": "<Color>",
"elevation": "<double>",
"height": "<double>",
"padding": "<EdgeInsets>",
"shadowColor": "<Color>",
"shape": "<NotchedShape>",
"surfaceTingColor": "<Color>"
}
See also:
Implementation
static BottomAppBarTheme? decodeBottomAppBarTheme(
dynamic value, {
bool validate = true,
}) {
BottomAppBarTheme? result;
if (value is BottomAppBarTheme) {
result = value;
} else if (value != null) {
assert(SchemaValidator.validate(
schemaId: '$_baseSchemaUrl/bottom_app_bar_theme',
value: value,
validate: validate,
));
result = BottomAppBarTheme(
color: decodeColor(
value['color'],
validate: false,
),
elevation: JsonClass.maybeParseDouble(value['elevation']),
height: JsonClass.maybeParseDouble(value['height']),
padding: decodeEdgeInsetsGeometry(
value['padding'],
validate: false,
),
shadowColor: decodeColor(
value['shadowColor'],
validate: false,
),
shape: decodeNotchedShape(
value['shape'],
validate: false,
),
surfaceTintColor: decodeColor(
value['surfaceTintColor'],
validate: false,
),
);
}
return result;
}