encodeFloatingActionButtonThemeData static method

Map<String, dynamic>? encodeFloatingActionButtonThemeData(
  1. FloatingActionButtonThemeData? value
)

Encodes the given value into a JSON representation.

{
  "backgroundColor": <Color>,
  "disabledElevation": <double>,
  "elevation": <double>,
  "focusColor": <Color>,
  "focusElevation": <double>,
  "foregroundColor": <Color>,
  "highlightElevation": <double>,
  "hoverColor": <Color>,
  "hoverElevation": <double>,
  "shape": <ShapeBorder>,
  "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,
      'focusColor': encodeColor(value.focusColor),
      'focusElevation': value.focusElevation,
      'foregroundColor': encodeColor(value.foregroundColor),
      'highlightElevation': value.highlightElevation,
      'hoverColor': encodeColor(value.hoverColor),
      'hoverElevation': value.hoverElevation,
      'shape': encodeShapeBorder(value.shape),
      'splashColor': encodeColor(value.splashColor),
    };
  }

  return _stripNull(result);
}