AreaPosition constructor
const
AreaPosition({
- @JsonKey.new(name: 'x_percentage') required double xPercentage,
- @JsonKey.new(name: 'y_percentage') required double yPercentage,
- @JsonKey.new(name: 'width_percentage') required double widthPercentage,
- @JsonKey.new(name: 'height_percentage') required double heightPercentage,
- @JsonKey.new(name: 'rotation_angle') required double rotationAngle,
- @JsonKey.new(name: 'corner_radius_percentage') required double cornerRadiusPercentage,
Creates a new AreaPosition object.
Implementation
const factory AreaPosition({
/// The abscissa of the rectangle's center, as a percentage of the media
/// or card width
@JsonKey(name: 'x_percentage') required double xPercentage,
/// The ordinate of the rectangle's center, as a percentage of the media
/// or card height
@JsonKey(name: 'y_percentage') required double yPercentage,
/// The width of the rectangle, as a percentage of the media or card width
@JsonKey(name: 'width_percentage') required double widthPercentage,
/// The height of the rectangle, as a percentage of the media or card
/// height
@JsonKey(name: 'height_percentage') required double heightPercentage,
/// The clockwise rotation angle of the rectangle, in degrees; 0-360
@JsonKey(name: 'rotation_angle') required double rotationAngle,
/// The radius of the rectangle corner rounding, as a percentage of the
/// media or card width
@JsonKey(name: 'corner_radius_percentage')
required double cornerRadiusPercentage,
}) = _AreaPosition;