encodeGradientTransform static method
Encodes the given value
to the String representation. This only
supports the following GradientTransform subclasses:
The emitted JSON will depend on the GradientTransform type and are each described below:
{
"radians": "<double>"
}
Implementation
static Map<String, dynamic>? encodeGradientTransform(
GradientTransform? value) {
assert(value == null || value is GradientRotation);
Map<String, dynamic>? result;
if (value != null && value is GradientRotation) {
result = {
'radians': value.radians,
};
}
return _stripDynamicNull(result);
}