encodeTypography static method
Encodes the given value
to a JSON compatible Map. The returned returned
value will have the following structure.
{
"black": <TextTheme>,
"dense": <TextTheme>,
"englishLike": <TextTheme>,
"platform": <TargetPlatform>,
"tall": <TextTheme>,
"white": <TextTheme>,
}
See also:
Implementation
static Map<String, dynamic>? encodeTypography(Typography? value) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'black': encodeTextTheme(value.black),
'dense': encodeTextTheme(value.dense),
'englishLike': encodeTextTheme(value.englishLike),
'tall': encodeTextTheme(value.tall),
'white': encodeTextTheme(value.white),
};
}
return _stripNull(result);
}