encodeFloatingActionButtonThemeData static method
Encodes the given value
into a JSON representation.
{
"backgroundColor": <Color>,
"disabledElevation": <double>,
"elevation": <double>,
"extendedIconLabelSpacing": <double>,
"extendedPadding": <EdgeInsetsGeometry>,
"extendedSizeConstraints": <BoxConstraints>,
"extendedTextStyle": <TextStyle>
"focusColor": <Color>,
"focusElevation": <double>,
"foregroundColor": <Color>,
"highlightElevation": <double>,
"hoverColor": <Color>,
"hoverElevation": <double>,
"largeSizeConstraints": <BoxConstraints>,
"shape": <ShapeBorder>,
"sizeConstraints": <BoxConstraints>,
"smallSizeConstraints": <BoxConstraints>,
"splashColor": <Color>
}
See also:
Implementation
static Map<String, dynamic>? encodeFloatingActionButtonThemeData(
FloatingActionButtonThemeData? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'backgroundColor': encodeColor(value.backgroundColor),
'disabledElevation': value.disabledElevation,
'elevation': value.elevation,
'enableFeedback': value.enableFeedback,
'extendedIconLabelSpacing': value.extendedIconLabelSpacing,
'extendedPadding': encodeEdgeInsetsGeometry(
value.extendedPadding as EdgeInsets?,
),
'extendedSizeConstraints': encodeBoxConstraints(
value.extendedSizeConstraints,
),
'extendedTextStyle': encodeTextStyle(value.extendedTextStyle),
'focusColor': encodeColor(value.focusColor),
'focusElevation': value.focusElevation,
'foregroundColor': encodeColor(value.foregroundColor),
'highlightElevation': value.highlightElevation,
'hoverColor': encodeColor(value.hoverColor),
'hoverElevation': value.hoverElevation,
'largeSizeConstraints': encodeBoxConstraints(
value.largeSizeConstraints,
),
'shape': encodeShapeBorder(value.shape),
'sizeConstraints': encodeBoxConstraints(value.sizeConstraints),
'smallSizeConstraints': encodeBoxConstraints(
value.smallSizeConstraints,
),
'splashColor': encodeColor(value.splashColor),
};
}
return _stripNull(result);
}