encodeDialogTheme static method

Map<String, dynamic>? encodeDialogTheme(
  1. DialogTheme? value
)

Encodes the given value to a JSON representation.

{
  "backgroundColor": <Color>,
  "contentTextStyle": <TextStyle>,
  "elevation": <double>,
  "shape": <ShapeBorder>,
  "titleTextStyle": <TextStyle>
}

See also:

Implementation

static Map<String, dynamic>? encodeDialogTheme(DialogTheme? value) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = <String, dynamic>{
      'backgroundColor': encodeColor(value.backgroundColor),
      'contentTextStyle': encodeTextStyle(value.contentTextStyle),
      'elevation': value.elevation,
      'shape': encodeShapeBorder(value.shape),
      'titleTextStyle': encodeTextStyle(value.titleTextStyle),
    };
  }

  return _stripNull(result);
}