decodeBottomAppBarTheme static method
Decodes the given value
to an BottomAppBarTheme. This expects the
given value
to follow the structure below:
{
"color": <Color>,
"elevation": <double>,
"shape": <NotchedShape>
}
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.parseDouble(value['elevation']),
shape: decodeNotchedShape(
value['shape'],
validate: false,
),
);
}
return result;
}