toHubbleLinearGradient method
Implementation
HubbleGradient? toHubbleLinearGradient({Rect? rect}) {
if (colors.isEmpty) return null;
return _HubbleLinearGradient(
colors: colors.map((e) => e.toHubbleColor()).toList(),
stops: stops.isNotEmpty ? stops : null,
begin: begin.toAlignment(),
end: end.toAlignment(),
tileMode: tileMode?.toTileMode() ?? TileMode.clamp,
rect: rect,
);
}