encodeCupertinoThemeData static method
Encodes the given value
to a JSON representation.
{
"applyThemeToAll": "<bool>",
"barBackgroundColor": "<Color>",
"brightness": "<Brightness>",
"primaryColor": "<Color>",
"primaryContrastingColor": "<Color>",
"scaffoldBackgroundColor": "<Color>",
"textTheme": "<CupertinoTextThemeData>"
}
See also:
Implementation
static Map<String, dynamic>? encodeCupertinoThemeData(
NoDefaultCupertinoThemeData? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'applyThemeToAll': value.applyThemeToAll,
'barBackgroundColor': encodeColor(value.barBackgroundColor),
'brightness': encodeBrightness(value.brightness),
'primaryColor': encodeColor(value.primaryColor),
'primaryContrastingColor': encodeColor(value.primaryContrastingColor),
'scaffoldBackgroundColor': encodeColor(value.scaffoldBackgroundColor),
'textTheme': encodeCupertinoTextThemeData(value.textTheme),
};
}
return _stripDynamicNull(result);
}