encodeSnackBarThemeData static method
Encodes the given value
to the JSON representation.
{
"actionTextColor": "<Color>",
"backgroundColor": "<Color>",
"behavior": "<SnackBarBehavior>",
"contentTextStyle": "<TextStyle>",
"disabledActionTextColor": "<Color>",
"elevation": "<double>",
"shape": "<ShapeBorder>",
"width": "<double>"
}
See also:
Implementation
static Map<String, dynamic>? encodeSnackBarThemeData(
SnackBarThemeData? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'actionTextColor': encodeColor(value.actionTextColor),
'backgroundColor': encodeColor(value.backgroundColor),
'behavior': encodeSnackBarBehavior(value.behavior),
'contentTextStyle': encodeTextStyle(value.contentTextStyle),
'disabledActionTextColor': encodeColor(value.disabledActionTextColor),
'elevation': value.elevation,
'shape': encodeShapeBorder(value.shape),
'width': value.width,
};
}
return _stripNull(result);
}