encodeDialogTheme static method
Encodes the given value
to a JSON representation.
{
"alignment": <Alignment>,
"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>{
'alignment': encodeAlignment(value.alignment as Alignment?),
'backgroundColor': encodeColor(value.backgroundColor),
'contentTextStyle': encodeTextStyle(value.contentTextStyle),
'elevation': value.elevation,
'shape': encodeShapeBorder(value.shape),
'titleTextStyle': encodeTextStyle(value.titleTextStyle),
};
}
return _stripNull(result);
}