toHubbleSweepGradient method

HubbleGradient? toHubbleSweepGradient({
  1. Rect? rect,
})

Implementation

HubbleGradient? toHubbleSweepGradient({Rect? rect}) {
  if (colors.isEmpty) return null;

  return _HubbleSweepGradient(
    colors: colors.map((e) => e.toHubbleColor()).toList(),
    stops: stops.isNotEmpty ? stops : null,
    center: center.toAlignment(),
    startAngle: startAngle,
    endAngle: endAngle,
    tileMode: tileMode?.toTileMode() ?? TileMode.clamp,
    rect: rect,
  );
}