decodeDividerThemeData static method
Decodes the given value
to an DividerThemeData. This expects the given
value
to follow the structure below:
{
"color": <Color>,
"endIndent": <double>,
"indent": <double>,
"space": <double>,
"thickness": <double>
}
See also:
Implementation
static DividerThemeData? decodeDividerThemeData(
dynamic value, {
bool validate = true,
}) {
DividerThemeData? result;
if (value is DividerThemeData) {
result = value;
} else if (value != null) {
assert(SchemaValidator.validate(
schemaId: '$_baseSchemaUrl/divider_theme_data',
value: value,
validate: validate,
));
result = DividerThemeData(
color: decodeColor(
value['color'],
validate: false,
),
endIndent: JsonClass.parseDouble(value['endIndent']),
indent: JsonClass.parseDouble(value['indent']),
space: JsonClass.parseDouble(value['space']),
thickness: JsonClass.parseDouble(value['thickness']),
);
}
return result;
}