BackgroundFill.freeformGradient constructor

const BackgroundFill.freeformGradient({
  1. @JsonKey(name: 'type') @Default(BackgroundFillType.freeformGradient) BackgroundFillType type,
  2. @JsonKey(name: 'colors') required List<int> colors,
})

Constructs a Freeform Gradient BackgroundFill

Implementation

const factory BackgroundFill.freeformGradient({
  /// Type of the background fill - always `freeform_gradient`
  @JsonKey(name: 'type')
  @Default(BackgroundFillType.freeformGradient)
  BackgroundFillType type,

  /// A list of the 3 or 4 base colors that are used to generate the freeform
  /// gradient in the RGB24 format.
  @JsonKey(name: 'colors') required final List<int> colors,
}) = BackgroundFillFreeformGradient;