getShader method
Attempt to lookup a pre-defined Shader by id
.
id
and bounds
must not be null.
Implementation
Shader? getShader(String id, Rect bounds) {
assert(id != null); // ignore: unnecessary_null_comparison
assert(bounds != null); // ignore: unnecessary_null_comparison
final DrawableGradient? srv = _gradients[id];
return srv != null ? srv.createShader(bounds) : null;
}