encodeTextDecorationStyle static method
Encodes the given value
to the String representation. Supported values
are:
dashed
dotted
double
solid
wavy
All other values, including null
, will result in null
.
Implementation
static String? encodeTextDecorationStyle(TextDecorationStyle? value) {
String? result;
if (value != null) {
switch (value) {
case TextDecorationStyle.dashed:
result = 'dashed';
break;
case TextDecorationStyle.dotted:
result = 'dotted';
break;
case TextDecorationStyle.double:
result = 'double';
break;
case TextDecorationStyle.solid:
result = 'solid';
break;
case TextDecorationStyle.wavy:
result = 'wavy';
break;
}
}
return _stripDynamicNull(result);
}