BackgroundFill.gradient constructor

const BackgroundFill.gradient({
  1. @JsonKey(name: 'type') @Default(BackgroundFillType.gradient) BackgroundFillType type,
  2. @JsonKey(name: 'top_color') required int topColor,
  3. @JsonKey(name: 'bottom_color') required int bottomColor,
  4. @JsonKey(name: 'rotation_angle') required int rotationAngle,
})

Constructs a BackgroundFillGradient object.

Implementation

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

  /// Top color of the gradient in the RGB24 format.
  @JsonKey(name: 'top_color') required final int topColor,

  /// Bottom color of the gradient in the RGB24 format.
  @JsonKey(name: 'bottom_color') required final int bottomColor,

  /// Clockwise rotation angle of the background fill in degrees, 0-359.
  @JsonKey(name: 'rotation_angle') required final int rotationAngle,
}) = BackgroundFillGradient;