encodeChipThemeData static method
Encodes the given value
into a JSON representation.
{
"backgroundColor": <Color>,
"borderSide": <BorderSide>,
"brightness": <Brightness>,
"checkmarkColor": <Color>,
"deleteIconColor": <Color>,
"disabledColor": <Color>,
"elevation": <double>,
"labelPadding": <EdgeInsetsGeometry>,
"labelStyle": <TextStyle>,
"padding": <EdgeInsetsGeometry>,
"pressElevation": <double>,
"secondaryLabelStyle": <TextStyle>,
"secondarySelectedColor": <Color>,
"selectedColor": <Color>,
"shape": <ShapeBorder>,
"selectedShadowColor": <Color>,
"shadowColor": <Color>,
"showCheckmark": <bool>
}
See also:
Implementation
static Map<String, dynamic>? encodeChipThemeData(ChipThemeData? value) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'backgroundColor': encodeColor(value.backgroundColor),
'brightness': encodeBrightness(value.brightness),
'checkmarkColor': encodeColor(value.checkmarkColor),
'deleteIconColor': encodeColor(value.deleteIconColor),
'disabledColor': encodeColor(value.disabledColor),
'elevation': value.elevation,
'labelPadding':
encodeEdgeInsetsGeometry(value.labelPadding as EdgeInsets?),
'labelStyle': encodeTextStyle(value.labelStyle),
'padding': encodeEdgeInsetsGeometry(value.padding as EdgeInsets?),
'pressElevation': value.pressElevation,
'secondaryLabelStyle': encodeTextStyle(value.secondaryLabelStyle),
'secondarySelectedColor': encodeColor(value.secondarySelectedColor),
'selectedColor': encodeColor(value.selectedColor),
'shape': encodeShapeBorder(value.shape),
'side': encodeBorderSide(value.side),
'selectedShadowColor': encodeColor(value.selectedShadowColor),
'shadowColor': encodeColor(value.shadowColor),
'showCheckmark': value.showCheckmark,
};
}
return _stripNull(result);
}