parseOpacity method
Parses an @opacity value into a double, clamped between 0..1.
Implementation
double? parseOpacity() {
final String? rawOpacity = getAttribute(attributes, 'opacity', def: null);
if (rawOpacity != null) {
return parseDouble(rawOpacity)!.clamp(0.0, 1.0).toDouble();
}
return null;
}