createShader method
Creates a ui.Gradient.radial
with duplicated colors
and stops
.
Implementation
@override
Shader createShader(Rect rect, {TextDirection? textDirection}) =>
ui.Gradient.radial(
center.resolve(textDirection).withinRect(rect),
radius * rect.shortestSide,
_duplicateEntries(colors),
_duplicateEntries(_impliedStops(colors.length))
..remove(0)
..removeLast(),
tileMode,
_resolveTransform(transform, rect, textDirection),
focal == null ? null : focal!.resolve(textDirection).withinRect(rect),
focalRadius * rect.shortestSide,
);