legendIconShader method
Implementation
@override
Shader? legendIconShader() {
if (parent != null && parent!.legend != null) {
final Rect legendIconBounds = Rect.fromLTWH(
0.0,
0.0,
parent!.legend!.iconWidth,
parent!.legend!.iconHeight,
);
if (onCreateShader != null) {
final ShaderDetails details = ShaderDetails(legendIconBounds, 'legend');
return onCreateShader?.call(details);
} else {
return gradient?.createShader(legendIconBounds);
}
}
return null;
}