BackgroundFill.gradient constructor
const
BackgroundFill.gradient({
- @JsonKey(name: 'type') @Default(BackgroundFillType.gradient) BackgroundFillType type,
- @JsonKey(name: 'top_color') required int topColor,
- @JsonKey(name: 'bottom_color') required int bottomColor,
- @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;