encodeDrawerThemeData static method
Encodes the given value
to a JSON compatible Map. The returned result
will always have the following format:
{
"backgroundColor": <Color>,
"elevation": <double>,
"scrimColor": <Color>,
"shape": <ShapeBorder>,
}
See also:
Implementation
static Map<String, dynamic>? encodeDrawerThemeData(
DrawerThemeData? value, {
bool validate = true,
}) {
Map<String, dynamic>? result;
if (value != null) {
result = {
'backgroundColor': encodeColor(value.backgroundColor),
'elevation': value.elevation,
'scrimColor': encodeColor(value.scrimColor),
'shape': encodeShapeBorder(value.shape),
};
}
return _stripNull(result);
}