WatermarkOptions
Configure watermark image.
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class WatermarkOptions {
const WatermarkOptions(
{this.visibleInPreview,
this.positionInLandscapeMode,
this.positionInPortraitMode,
this.watermarkRatio,
this.mode, this.zOrder});
@JsonKey(name: 'visibleInPreview')
final bool? visibleInPreview;
@JsonKey(name: 'positionInLandscapeMode')
final Rectangle? positionInLandscapeMode;
@JsonKey(name: 'positionInPortraitMode')
final Rectangle? positionInPortraitMode;
@JsonKey(name: 'watermarkRatio')
final WatermarkRatio? watermarkRatio;
@JsonKey(name: 'mode')
final WatermarkFitMode? mode;
@JsonKey(name: 'zOrder')
final int? zOrder;
factory WatermarkOptions.fromJson(Map<String, dynamic> json) =>
_$WatermarkOptionsFromJson(json);
Map<String, dynamic> toJson() => _$WatermarkOptionsToJson(this);
}
Used to configure the watermark image to be added.
Properties
- visibleInPreview
- Whether the watermark is visible in the local preview view:
- true: (Default) The watermark is visible in the local preview view.
- false: The watermark is not visible in the local preview view.
- positionInLandscapeMode
- When the watermark fit mode is fitModeCoverPosition, this parameter sets the area of the watermark image in landscape mode. See Rectangle.
- positionInPortraitMode
- When the watermark fit mode is fitModeCoverPosition, this parameter sets the area of the watermark image in portrait mode. See Rectangle.
- watermarkRatio
- When the watermark fit mode is fitModeUseImageRatio, this parameter sets the watermark coordinates in scaling mode. See WatermarkRatio.
- mode
- The fit mode of the watermark. See WatermarkFitMode.
- zOrder
- Z-order of the watermark image. Default value is 0.