gradientColor static method

ValueDelegate<List<Color>> gradientColor(
  1. List<String> keyPath, {
  2. List<Color>? value,
  3. List<Color> callback(
    1. LottieFrameInfo<List<Color>>
    )?,
})

The colors of a gradient fill or stroke.

The callback receives the gradient's current colors as both LottieFrameInfo.startValue and LottieFrameInfo.endValue, one per stop. There can be more stops than in the design: stops are added to match the opacity stops.

When the number of colors differs from the number of stops, the colors are spread evenly between the first and the last stop.

Implementation

static ValueDelegate<List<Color>> gradientColor(
  List<String> keyPath, {
  List<Color>? value,
  List<Color> Function(LottieFrameInfo<List<Color>>)? callback,
}) => ValueDelegate._(keyPath, LottieProperty.gradientColor, value, callback);