RadialGradient

class RadialGradient(val easing: Easing = EaseIn, val center: Offset = Offset.Unspecified, val centerIntensity: Float = 1.0f, val radius: Float = Float.POSITIVE_INFINITY, val radiusIntensity: Float = 0.0f) : HazeProgressive

A radial gradient effect.

Platform support:

  • Skia backed platforms (iOS, Desktop, etc): ✅

  • Android SDK Level 33+: ✅

  • Android SDK Level 31-32: Falls back to a mask

  • Android SDK Level < 31: Falls back to a scrim

Parameters

easing
  • The easing function to use when applying the effect. Defaults to a linear easing effect.

center

Center position of the radial gradient circle. If this is set to Offset.Unspecified then the center of the drawing area is used as the center for the radial gradient. Float.POSITIVE_INFINITY can be used for either Offset.x or Offset.y to indicate the far right or far bottom of the drawing area respectively.

centerIntensity
  • The intensity of the haze effect at the center, in the range 0f..1f.

radius

Radius for the radial gradient. Defaults to positive infinity to indicate the largest radius that can fit within the bounds of the drawing area.

radiusIntensity
  • The intensity of the haze effect at the radius, in the range 0f..1f

Constructors

Link copied to clipboard
constructor(easing: Easing = EaseIn, center: Offset = Offset.Unspecified, centerIntensity: Float = 1.0f, radius: Float = Float.POSITIVE_INFINITY, radiusIntensity: Float = 0.0f)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard