BackgroundFill class sealed

This object describes the way a background is filled based on the selected colors. Currently, it can be one of

Annotations
  • @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)

Constructors

BackgroundFill.freeformGradient({@JsonKey(name: 'type') @Default(BackgroundFillType.freeformGradient) BackgroundFillType type, @JsonKey(name: 'colors') required List<int> colors})
Constructs a Freeform Gradient BackgroundFill
const
factory
BackgroundFill.fromJson(Map<String, Object?> json)
factory
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.
const
factory
BackgroundFill.solid({@JsonKey(name: 'type') @Default(BackgroundFillType.solid) BackgroundFillType type, @JsonKey(name: 'color') required int color})
Constructs a BackgroundFillSolid instance
const
factory

Properties

copyWith → $BackgroundFillCopyWith<BackgroundFill>
Create a copy of BackgroundFill with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type BackgroundFillType
Type of the background fill - always solid
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this BackgroundFill to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited