StoryAreaPosition constructor

const StoryAreaPosition({
  1. @JsonKey.new(name: 'x_percentage') required double xPercentage,
  2. @JsonKey.new(name: 'y_percentage') required double yPercentage,
  3. @JsonKey.new(name: 'width_percentage') required double widthPercentage,
  4. @JsonKey.new(name: 'height_percentage') required double heightPercentage,
  5. @JsonKey.new(name: 'rotation_angle') required double rotationAngle,
  6. @JsonKey.new(name: 'corner_radius_percentage') required double cornerRadiusPercentage,
})

Creates a new StoryAreaPosition object.

Implementation

const factory StoryAreaPosition({
  /// The abscissa of the area's center, as a percentage of the media width
  @JsonKey(name: 'x_percentage') required double xPercentage,

  /// The ordinate of the area's center, as a percentage of the media height
  @JsonKey(name: 'y_percentage') required double yPercentage,

  /// The width of the area's rectangle, as a percentage of the media width
  @JsonKey(name: 'width_percentage') required double widthPercentage,

  /// The height of the area's rectangle, as a percentage of the media 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 width
  @JsonKey(name: 'corner_radius_percentage')
  required double cornerRadiusPercentage,
}) = _StoryAreaPosition;