Files
xianyan/lib/editor/models/layer_models.freezed.dart
Developer 3a38c69521 chore: 完成v1.2.3版本迭代更新
主要变更:
1. 移除摇一摇相关功能代码与依赖
2. 新增自定义频道导入与管理功能
3. 优化iOS/macOS平台配置与适配
4. 重构路由转场逻辑为原生Cupertino风格
5. 修复设备发现与文件传输相关bug
6. 调整深色模式默认值为纯黑AMOLED
7. 新增运行模式标签与Spotlight搜索优化
8. 清理废弃的本地化字符串与设置项
2026-06-10 07:57:58 +08:00

641 lines
43 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'layer_models.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$LayerInfo {
String get id; String get name; bool get visible; bool get locked; double get opacity; int get zIndex;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LayerInfoCopyWith<LayerInfo> get copyWith => _$LayerInfoCopyWithImpl<LayerInfo>(this as LayerInfo, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is LayerInfo&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.opacity, opacity) || other.opacity == opacity)&&(identical(other.zIndex, zIndex) || other.zIndex == zIndex));
}
@override
int get hashCode => Object.hash(runtimeType,id,name,visible,locked,opacity,zIndex);
@override
String toString() {
return 'LayerInfo(id: $id, name: $name, visible: $visible, locked: $locked, opacity: $opacity, zIndex: $zIndex)';
}
}
/// @nodoc
abstract mixin class $LayerInfoCopyWith<$Res> {
factory $LayerInfoCopyWith(LayerInfo value, $Res Function(LayerInfo) _then) = _$LayerInfoCopyWithImpl;
@useResult
$Res call({
String id, String name, bool visible, bool locked, double opacity, int zIndex
});
}
/// @nodoc
class _$LayerInfoCopyWithImpl<$Res>
implements $LayerInfoCopyWith<$Res> {
_$LayerInfoCopyWithImpl(this._self, this._then);
final LayerInfo _self;
final $Res Function(LayerInfo) _then;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? visible = null,Object? locked = null,Object? opacity = null,Object? zIndex = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
as bool,locked: null == locked ? _self.locked : locked // ignore: cast_nullable_to_non_nullable
as bool,opacity: null == opacity ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable
as double,zIndex: null == zIndex ? _self.zIndex : zIndex // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [LayerInfo].
extension LayerInfoPatterns on LayerInfo {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( TextLayerInfo value)? text,TResult Function( StickerLayerInfo value)? sticker,TResult Function( GlassLayerInfo value)? glass,TResult Function( AnnotationLayerInfo value)? annotation,required TResult orElse(),}){
final _that = this;
switch (_that) {
case TextLayerInfo() when text != null:
return text(_that);case StickerLayerInfo() when sticker != null:
return sticker(_that);case GlassLayerInfo() when glass != null:
return glass(_that);case AnnotationLayerInfo() when annotation != null:
return annotation(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( TextLayerInfo value) text,required TResult Function( StickerLayerInfo value) sticker,required TResult Function( GlassLayerInfo value) glass,required TResult Function( AnnotationLayerInfo value) annotation,}){
final _that = this;
switch (_that) {
case TextLayerInfo():
return text(_that);case StickerLayerInfo():
return sticker(_that);case GlassLayerInfo():
return glass(_that);case AnnotationLayerInfo():
return annotation(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( TextLayerInfo value)? text,TResult? Function( StickerLayerInfo value)? sticker,TResult? Function( GlassLayerInfo value)? glass,TResult? Function( AnnotationLayerInfo value)? annotation,}){
final _that = this;
switch (_that) {
case TextLayerInfo() when text != null:
return text(_that);case StickerLayerInfo() when sticker != null:
return sticker(_that);case GlassLayerInfo() when glass != null:
return glass(_that);case AnnotationLayerInfo() when annotation != null:
return annotation(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( String id, String name, String text, double fontSize, FontWeight fontWeight, String fontFamily, Color color, TextAlignMode textAlign, double offsetX, double offsetY, double rotation, double scale, double letterSpacing, double lineHeight, bool italic, bool underline, bool strikethrough, Color? strokeColor, double strokeWidth, Color? shadowColor, double shadowBlur, double shadowOffsetX, double shadowOffsetY, bool visible, bool locked, double opacity, int zIndex)? text,TResult Function( String id, String name, StickerType stickerType, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex)? sticker,TResult Function( String id, String name, GlassStyle style, double offsetX, double offsetY, double width, double height, double rotation, double scale, double borderRadius, double blurIntensity, double opacity, double borderOpacity, double highlightStrength, bool showHighlight, bool showInnerShadow, Color tintColor, bool visible, bool locked, int zIndex, List<String> containedTextIds, List<String> containedStickerIds)? glass,TResult Function( String id, String name, AnnotationType annotationType, List<AnnotationPoint> points, double strokeWidth, Color color, double opacity, bool visible, bool locked, int zIndex)? annotation,required TResult orElse(),}) {final _that = this;
switch (_that) {
case TextLayerInfo() when text != null:
return text(_that.id,_that.name,_that.text,_that.fontSize,_that.fontWeight,_that.fontFamily,_that.color,_that.textAlign,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.letterSpacing,_that.lineHeight,_that.italic,_that.underline,_that.strikethrough,_that.strokeColor,_that.strokeWidth,_that.shadowColor,_that.shadowBlur,_that.shadowOffsetX,_that.shadowOffsetY,_that.visible,_that.locked,_that.opacity,_that.zIndex);case StickerLayerInfo() when sticker != null:
return sticker(_that.id,_that.name,_that.stickerType,_that.assetPath,_that.size,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.opacity,_that.visible,_that.locked,_that.zIndex);case GlassLayerInfo() when glass != null:
return glass(_that.id,_that.name,_that.style,_that.offsetX,_that.offsetY,_that.width,_that.height,_that.rotation,_that.scale,_that.borderRadius,_that.blurIntensity,_that.opacity,_that.borderOpacity,_that.highlightStrength,_that.showHighlight,_that.showInnerShadow,_that.tintColor,_that.visible,_that.locked,_that.zIndex,_that.containedTextIds,_that.containedStickerIds);case AnnotationLayerInfo() when annotation != null:
return annotation(_that.id,_that.name,_that.annotationType,_that.points,_that.strokeWidth,_that.color,_that.opacity,_that.visible,_that.locked,_that.zIndex);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( String id, String name, String text, double fontSize, FontWeight fontWeight, String fontFamily, Color color, TextAlignMode textAlign, double offsetX, double offsetY, double rotation, double scale, double letterSpacing, double lineHeight, bool italic, bool underline, bool strikethrough, Color? strokeColor, double strokeWidth, Color? shadowColor, double shadowBlur, double shadowOffsetX, double shadowOffsetY, bool visible, bool locked, double opacity, int zIndex) text,required TResult Function( String id, String name, StickerType stickerType, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex) sticker,required TResult Function( String id, String name, GlassStyle style, double offsetX, double offsetY, double width, double height, double rotation, double scale, double borderRadius, double blurIntensity, double opacity, double borderOpacity, double highlightStrength, bool showHighlight, bool showInnerShadow, Color tintColor, bool visible, bool locked, int zIndex, List<String> containedTextIds, List<String> containedStickerIds) glass,required TResult Function( String id, String name, AnnotationType annotationType, List<AnnotationPoint> points, double strokeWidth, Color color, double opacity, bool visible, bool locked, int zIndex) annotation,}) {final _that = this;
switch (_that) {
case TextLayerInfo():
return text(_that.id,_that.name,_that.text,_that.fontSize,_that.fontWeight,_that.fontFamily,_that.color,_that.textAlign,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.letterSpacing,_that.lineHeight,_that.italic,_that.underline,_that.strikethrough,_that.strokeColor,_that.strokeWidth,_that.shadowColor,_that.shadowBlur,_that.shadowOffsetX,_that.shadowOffsetY,_that.visible,_that.locked,_that.opacity,_that.zIndex);case StickerLayerInfo():
return sticker(_that.id,_that.name,_that.stickerType,_that.assetPath,_that.size,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.opacity,_that.visible,_that.locked,_that.zIndex);case GlassLayerInfo():
return glass(_that.id,_that.name,_that.style,_that.offsetX,_that.offsetY,_that.width,_that.height,_that.rotation,_that.scale,_that.borderRadius,_that.blurIntensity,_that.opacity,_that.borderOpacity,_that.highlightStrength,_that.showHighlight,_that.showInnerShadow,_that.tintColor,_that.visible,_that.locked,_that.zIndex,_that.containedTextIds,_that.containedStickerIds);case AnnotationLayerInfo():
return annotation(_that.id,_that.name,_that.annotationType,_that.points,_that.strokeWidth,_that.color,_that.opacity,_that.visible,_that.locked,_that.zIndex);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( String id, String name, String text, double fontSize, FontWeight fontWeight, String fontFamily, Color color, TextAlignMode textAlign, double offsetX, double offsetY, double rotation, double scale, double letterSpacing, double lineHeight, bool italic, bool underline, bool strikethrough, Color? strokeColor, double strokeWidth, Color? shadowColor, double shadowBlur, double shadowOffsetX, double shadowOffsetY, bool visible, bool locked, double opacity, int zIndex)? text,TResult? Function( String id, String name, StickerType stickerType, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex)? sticker,TResult? Function( String id, String name, GlassStyle style, double offsetX, double offsetY, double width, double height, double rotation, double scale, double borderRadius, double blurIntensity, double opacity, double borderOpacity, double highlightStrength, bool showHighlight, bool showInnerShadow, Color tintColor, bool visible, bool locked, int zIndex, List<String> containedTextIds, List<String> containedStickerIds)? glass,TResult? Function( String id, String name, AnnotationType annotationType, List<AnnotationPoint> points, double strokeWidth, Color color, double opacity, bool visible, bool locked, int zIndex)? annotation,}) {final _that = this;
switch (_that) {
case TextLayerInfo() when text != null:
return text(_that.id,_that.name,_that.text,_that.fontSize,_that.fontWeight,_that.fontFamily,_that.color,_that.textAlign,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.letterSpacing,_that.lineHeight,_that.italic,_that.underline,_that.strikethrough,_that.strokeColor,_that.strokeWidth,_that.shadowColor,_that.shadowBlur,_that.shadowOffsetX,_that.shadowOffsetY,_that.visible,_that.locked,_that.opacity,_that.zIndex);case StickerLayerInfo() when sticker != null:
return sticker(_that.id,_that.name,_that.stickerType,_that.assetPath,_that.size,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.opacity,_that.visible,_that.locked,_that.zIndex);case GlassLayerInfo() when glass != null:
return glass(_that.id,_that.name,_that.style,_that.offsetX,_that.offsetY,_that.width,_that.height,_that.rotation,_that.scale,_that.borderRadius,_that.blurIntensity,_that.opacity,_that.borderOpacity,_that.highlightStrength,_that.showHighlight,_that.showInnerShadow,_that.tintColor,_that.visible,_that.locked,_that.zIndex,_that.containedTextIds,_that.containedStickerIds);case AnnotationLayerInfo() when annotation != null:
return annotation(_that.id,_that.name,_that.annotationType,_that.points,_that.strokeWidth,_that.color,_that.opacity,_that.visible,_that.locked,_that.zIndex);case _:
return null;
}
}
}
/// @nodoc
class TextLayerInfo extends LayerInfo {
const TextLayerInfo({required this.id, this.name = '', required this.text, this.fontSize = 24.0, this.fontWeight = FontWeight.normal, this.fontFamily = 'Inter', this.color = const Color(0xFF1A1A2E), this.textAlign = TextAlignMode.center, this.offsetX = 0.0, this.offsetY = 0.0, this.rotation = 0.0, this.scale = 1.0, this.letterSpacing = 0.0, this.lineHeight = 1.5, this.italic = false, this.underline = false, this.strikethrough = false, this.strokeColor, this.strokeWidth = 0.0, this.shadowColor, this.shadowBlur = 0.0, this.shadowOffsetX = 0.0, this.shadowOffsetY = 0.0, this.visible = true, this.locked = false, this.opacity = 1.0, this.zIndex = 0}): super._();
@override final String id;
@override@JsonKey() final String name;
final String text;
@JsonKey() final double fontSize;
@JsonKey() final FontWeight fontWeight;
@JsonKey() final String fontFamily;
@JsonKey() final Color color;
@JsonKey() final TextAlignMode textAlign;
@JsonKey() final double offsetX;
@JsonKey() final double offsetY;
@JsonKey() final double rotation;
@JsonKey() final double scale;
@JsonKey() final double letterSpacing;
@JsonKey() final double lineHeight;
@JsonKey() final bool italic;
@JsonKey() final bool underline;
@JsonKey() final bool strikethrough;
final Color? strokeColor;
@JsonKey() final double strokeWidth;
final Color? shadowColor;
@JsonKey() final double shadowBlur;
@JsonKey() final double shadowOffsetX;
@JsonKey() final double shadowOffsetY;
@override@JsonKey() final bool visible;
@override@JsonKey() final bool locked;
@override@JsonKey() final double opacity;
@override@JsonKey() final int zIndex;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TextLayerInfoCopyWith<TextLayerInfo> get copyWith => _$TextLayerInfoCopyWithImpl<TextLayerInfo>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TextLayerInfo&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.text, text) || other.text == text)&&(identical(other.fontSize, fontSize) || other.fontSize == fontSize)&&(identical(other.fontWeight, fontWeight) || other.fontWeight == fontWeight)&&(identical(other.fontFamily, fontFamily) || other.fontFamily == fontFamily)&&(identical(other.color, color) || other.color == color)&&(identical(other.textAlign, textAlign) || other.textAlign == textAlign)&&(identical(other.offsetX, offsetX) || other.offsetX == offsetX)&&(identical(other.offsetY, offsetY) || other.offsetY == offsetY)&&(identical(other.rotation, rotation) || other.rotation == rotation)&&(identical(other.scale, scale) || other.scale == scale)&&(identical(other.letterSpacing, letterSpacing) || other.letterSpacing == letterSpacing)&&(identical(other.lineHeight, lineHeight) || other.lineHeight == lineHeight)&&(identical(other.italic, italic) || other.italic == italic)&&(identical(other.underline, underline) || other.underline == underline)&&(identical(other.strikethrough, strikethrough) || other.strikethrough == strikethrough)&&(identical(other.strokeColor, strokeColor) || other.strokeColor == strokeColor)&&(identical(other.strokeWidth, strokeWidth) || other.strokeWidth == strokeWidth)&&(identical(other.shadowColor, shadowColor) || other.shadowColor == shadowColor)&&(identical(other.shadowBlur, shadowBlur) || other.shadowBlur == shadowBlur)&&(identical(other.shadowOffsetX, shadowOffsetX) || other.shadowOffsetX == shadowOffsetX)&&(identical(other.shadowOffsetY, shadowOffsetY) || other.shadowOffsetY == shadowOffsetY)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.opacity, opacity) || other.opacity == opacity)&&(identical(other.zIndex, zIndex) || other.zIndex == zIndex));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,name,text,fontSize,fontWeight,fontFamily,color,textAlign,offsetX,offsetY,rotation,scale,letterSpacing,lineHeight,italic,underline,strikethrough,strokeColor,strokeWidth,shadowColor,shadowBlur,shadowOffsetX,shadowOffsetY,visible,locked,opacity,zIndex]);
@override
String toString() {
return 'LayerInfo.text(id: $id, name: $name, text: $text, fontSize: $fontSize, fontWeight: $fontWeight, fontFamily: $fontFamily, color: $color, textAlign: $textAlign, offsetX: $offsetX, offsetY: $offsetY, rotation: $rotation, scale: $scale, letterSpacing: $letterSpacing, lineHeight: $lineHeight, italic: $italic, underline: $underline, strikethrough: $strikethrough, strokeColor: $strokeColor, strokeWidth: $strokeWidth, shadowColor: $shadowColor, shadowBlur: $shadowBlur, shadowOffsetX: $shadowOffsetX, shadowOffsetY: $shadowOffsetY, visible: $visible, locked: $locked, opacity: $opacity, zIndex: $zIndex)';
}
}
/// @nodoc
abstract mixin class $TextLayerInfoCopyWith<$Res> implements $LayerInfoCopyWith<$Res> {
factory $TextLayerInfoCopyWith(TextLayerInfo value, $Res Function(TextLayerInfo) _then) = _$TextLayerInfoCopyWithImpl;
@override @useResult
$Res call({
String id, String name, String text, double fontSize, FontWeight fontWeight, String fontFamily, Color color, TextAlignMode textAlign, double offsetX, double offsetY, double rotation, double scale, double letterSpacing, double lineHeight, bool italic, bool underline, bool strikethrough, Color? strokeColor, double strokeWidth, Color? shadowColor, double shadowBlur, double shadowOffsetX, double shadowOffsetY, bool visible, bool locked, double opacity, int zIndex
});
}
/// @nodoc
class _$TextLayerInfoCopyWithImpl<$Res>
implements $TextLayerInfoCopyWith<$Res> {
_$TextLayerInfoCopyWithImpl(this._self, this._then);
final TextLayerInfo _self;
final $Res Function(TextLayerInfo) _then;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? text = null,Object? fontSize = null,Object? fontWeight = null,Object? fontFamily = null,Object? color = null,Object? textAlign = null,Object? offsetX = null,Object? offsetY = null,Object? rotation = null,Object? scale = null,Object? letterSpacing = null,Object? lineHeight = null,Object? italic = null,Object? underline = null,Object? strikethrough = null,Object? strokeColor = freezed,Object? strokeWidth = null,Object? shadowColor = freezed,Object? shadowBlur = null,Object? shadowOffsetX = null,Object? shadowOffsetY = null,Object? visible = null,Object? locked = null,Object? opacity = null,Object? zIndex = null,}) {
return _then(TextLayerInfo(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable
as String,fontSize: null == fontSize ? _self.fontSize : fontSize // ignore: cast_nullable_to_non_nullable
as double,fontWeight: null == fontWeight ? _self.fontWeight : fontWeight // ignore: cast_nullable_to_non_nullable
as FontWeight,fontFamily: null == fontFamily ? _self.fontFamily : fontFamily // ignore: cast_nullable_to_non_nullable
as String,color: null == color ? _self.color : color // ignore: cast_nullable_to_non_nullable
as Color,textAlign: null == textAlign ? _self.textAlign : textAlign // ignore: cast_nullable_to_non_nullable
as TextAlignMode,offsetX: null == offsetX ? _self.offsetX : offsetX // ignore: cast_nullable_to_non_nullable
as double,offsetY: null == offsetY ? _self.offsetY : offsetY // ignore: cast_nullable_to_non_nullable
as double,rotation: null == rotation ? _self.rotation : rotation // ignore: cast_nullable_to_non_nullable
as double,scale: null == scale ? _self.scale : scale // ignore: cast_nullable_to_non_nullable
as double,letterSpacing: null == letterSpacing ? _self.letterSpacing : letterSpacing // ignore: cast_nullable_to_non_nullable
as double,lineHeight: null == lineHeight ? _self.lineHeight : lineHeight // ignore: cast_nullable_to_non_nullable
as double,italic: null == italic ? _self.italic : italic // ignore: cast_nullable_to_non_nullable
as bool,underline: null == underline ? _self.underline : underline // ignore: cast_nullable_to_non_nullable
as bool,strikethrough: null == strikethrough ? _self.strikethrough : strikethrough // ignore: cast_nullable_to_non_nullable
as bool,strokeColor: freezed == strokeColor ? _self.strokeColor : strokeColor // ignore: cast_nullable_to_non_nullable
as Color?,strokeWidth: null == strokeWidth ? _self.strokeWidth : strokeWidth // ignore: cast_nullable_to_non_nullable
as double,shadowColor: freezed == shadowColor ? _self.shadowColor : shadowColor // ignore: cast_nullable_to_non_nullable
as Color?,shadowBlur: null == shadowBlur ? _self.shadowBlur : shadowBlur // ignore: cast_nullable_to_non_nullable
as double,shadowOffsetX: null == shadowOffsetX ? _self.shadowOffsetX : shadowOffsetX // ignore: cast_nullable_to_non_nullable
as double,shadowOffsetY: null == shadowOffsetY ? _self.shadowOffsetY : shadowOffsetY // ignore: cast_nullable_to_non_nullable
as double,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
as bool,locked: null == locked ? _self.locked : locked // ignore: cast_nullable_to_non_nullable
as bool,opacity: null == opacity ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable
as double,zIndex: null == zIndex ? _self.zIndex : zIndex // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
class StickerLayerInfo extends LayerInfo {
const StickerLayerInfo({required this.id, this.name = '', this.stickerType = StickerType.emoji, required this.assetPath, this.size = 80.0, this.offsetX = 0.0, this.offsetY = 0.0, this.rotation = 0.0, this.scale = 1.0, this.opacity = 1.0, this.visible = true, this.locked = false, this.zIndex = 0}): super._();
@override final String id;
@override@JsonKey() final String name;
@JsonKey() final StickerType stickerType;
final String assetPath;
@JsonKey() final double size;
@JsonKey() final double offsetX;
@JsonKey() final double offsetY;
@JsonKey() final double rotation;
@JsonKey() final double scale;
@override@JsonKey() final double opacity;
@override@JsonKey() final bool visible;
@override@JsonKey() final bool locked;
@override@JsonKey() final int zIndex;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$StickerLayerInfoCopyWith<StickerLayerInfo> get copyWith => _$StickerLayerInfoCopyWithImpl<StickerLayerInfo>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is StickerLayerInfo&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.stickerType, stickerType) || other.stickerType == stickerType)&&(identical(other.assetPath, assetPath) || other.assetPath == assetPath)&&(identical(other.size, size) || other.size == size)&&(identical(other.offsetX, offsetX) || other.offsetX == offsetX)&&(identical(other.offsetY, offsetY) || other.offsetY == offsetY)&&(identical(other.rotation, rotation) || other.rotation == rotation)&&(identical(other.scale, scale) || other.scale == scale)&&(identical(other.opacity, opacity) || other.opacity == opacity)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.zIndex, zIndex) || other.zIndex == zIndex));
}
@override
int get hashCode => Object.hash(runtimeType,id,name,stickerType,assetPath,size,offsetX,offsetY,rotation,scale,opacity,visible,locked,zIndex);
@override
String toString() {
return 'LayerInfo.sticker(id: $id, name: $name, stickerType: $stickerType, assetPath: $assetPath, size: $size, offsetX: $offsetX, offsetY: $offsetY, rotation: $rotation, scale: $scale, opacity: $opacity, visible: $visible, locked: $locked, zIndex: $zIndex)';
}
}
/// @nodoc
abstract mixin class $StickerLayerInfoCopyWith<$Res> implements $LayerInfoCopyWith<$Res> {
factory $StickerLayerInfoCopyWith(StickerLayerInfo value, $Res Function(StickerLayerInfo) _then) = _$StickerLayerInfoCopyWithImpl;
@override @useResult
$Res call({
String id, String name, StickerType stickerType, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex
});
}
/// @nodoc
class _$StickerLayerInfoCopyWithImpl<$Res>
implements $StickerLayerInfoCopyWith<$Res> {
_$StickerLayerInfoCopyWithImpl(this._self, this._then);
final StickerLayerInfo _self;
final $Res Function(StickerLayerInfo) _then;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? stickerType = null,Object? assetPath = null,Object? size = null,Object? offsetX = null,Object? offsetY = null,Object? rotation = null,Object? scale = null,Object? opacity = null,Object? visible = null,Object? locked = null,Object? zIndex = null,}) {
return _then(StickerLayerInfo(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,stickerType: null == stickerType ? _self.stickerType : stickerType // ignore: cast_nullable_to_non_nullable
as StickerType,assetPath: null == assetPath ? _self.assetPath : assetPath // ignore: cast_nullable_to_non_nullable
as String,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
as double,offsetX: null == offsetX ? _self.offsetX : offsetX // ignore: cast_nullable_to_non_nullable
as double,offsetY: null == offsetY ? _self.offsetY : offsetY // ignore: cast_nullable_to_non_nullable
as double,rotation: null == rotation ? _self.rotation : rotation // ignore: cast_nullable_to_non_nullable
as double,scale: null == scale ? _self.scale : scale // ignore: cast_nullable_to_non_nullable
as double,opacity: null == opacity ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable
as double,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
as bool,locked: null == locked ? _self.locked : locked // ignore: cast_nullable_to_non_nullable
as bool,zIndex: null == zIndex ? _self.zIndex : zIndex // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
class GlassLayerInfo extends LayerInfo {
const GlassLayerInfo({required this.id, this.name = '', this.style = GlassStyle.crystal, this.offsetX = 0.0, this.offsetY = 0.0, this.width = 200.0, this.height = 150.0, this.rotation = 0.0, this.scale = 1.0, this.borderRadius = 20.0, this.blurIntensity = 25.0, this.opacity = 0.65, this.borderOpacity = 0.15, this.highlightStrength = 0.4, this.showHighlight = true, this.showInnerShadow = true, this.tintColor = Colors.white, this.visible = true, this.locked = false, this.zIndex = 10, final List<String> containedTextIds = const <String>[], final List<String> containedStickerIds = const <String>[]}): _containedTextIds = containedTextIds,_containedStickerIds = containedStickerIds,super._();
@override final String id;
@override@JsonKey() final String name;
@JsonKey() final GlassStyle style;
@JsonKey() final double offsetX;
@JsonKey() final double offsetY;
@JsonKey() final double width;
@JsonKey() final double height;
@JsonKey() final double rotation;
@JsonKey() final double scale;
@JsonKey() final double borderRadius;
@JsonKey() final double blurIntensity;
@override@JsonKey() final double opacity;
@JsonKey() final double borderOpacity;
@JsonKey() final double highlightStrength;
@JsonKey() final bool showHighlight;
@JsonKey() final bool showInnerShadow;
@JsonKey() final Color tintColor;
@override@JsonKey() final bool visible;
@override@JsonKey() final bool locked;
@override@JsonKey() final int zIndex;
final List<String> _containedTextIds;
@JsonKey() List<String> get containedTextIds {
if (_containedTextIds is EqualUnmodifiableListView) return _containedTextIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_containedTextIds);
}
final List<String> _containedStickerIds;
@JsonKey() List<String> get containedStickerIds {
if (_containedStickerIds is EqualUnmodifiableListView) return _containedStickerIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_containedStickerIds);
}
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$GlassLayerInfoCopyWith<GlassLayerInfo> get copyWith => _$GlassLayerInfoCopyWithImpl<GlassLayerInfo>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is GlassLayerInfo&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.style, style) || other.style == style)&&(identical(other.offsetX, offsetX) || other.offsetX == offsetX)&&(identical(other.offsetY, offsetY) || other.offsetY == offsetY)&&(identical(other.width, width) || other.width == width)&&(identical(other.height, height) || other.height == height)&&(identical(other.rotation, rotation) || other.rotation == rotation)&&(identical(other.scale, scale) || other.scale == scale)&&(identical(other.borderRadius, borderRadius) || other.borderRadius == borderRadius)&&(identical(other.blurIntensity, blurIntensity) || other.blurIntensity == blurIntensity)&&(identical(other.opacity, opacity) || other.opacity == opacity)&&(identical(other.borderOpacity, borderOpacity) || other.borderOpacity == borderOpacity)&&(identical(other.highlightStrength, highlightStrength) || other.highlightStrength == highlightStrength)&&(identical(other.showHighlight, showHighlight) || other.showHighlight == showHighlight)&&(identical(other.showInnerShadow, showInnerShadow) || other.showInnerShadow == showInnerShadow)&&(identical(other.tintColor, tintColor) || other.tintColor == tintColor)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.zIndex, zIndex) || other.zIndex == zIndex)&&const DeepCollectionEquality().equals(other._containedTextIds, _containedTextIds)&&const DeepCollectionEquality().equals(other._containedStickerIds, _containedStickerIds));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,name,style,offsetX,offsetY,width,height,rotation,scale,borderRadius,blurIntensity,opacity,borderOpacity,highlightStrength,showHighlight,showInnerShadow,tintColor,visible,locked,zIndex,const DeepCollectionEquality().hash(_containedTextIds),const DeepCollectionEquality().hash(_containedStickerIds)]);
@override
String toString() {
return 'LayerInfo.glass(id: $id, name: $name, style: $style, offsetX: $offsetX, offsetY: $offsetY, width: $width, height: $height, rotation: $rotation, scale: $scale, borderRadius: $borderRadius, blurIntensity: $blurIntensity, opacity: $opacity, borderOpacity: $borderOpacity, highlightStrength: $highlightStrength, showHighlight: $showHighlight, showInnerShadow: $showInnerShadow, tintColor: $tintColor, visible: $visible, locked: $locked, zIndex: $zIndex, containedTextIds: $containedTextIds, containedStickerIds: $containedStickerIds)';
}
}
/// @nodoc
abstract mixin class $GlassLayerInfoCopyWith<$Res> implements $LayerInfoCopyWith<$Res> {
factory $GlassLayerInfoCopyWith(GlassLayerInfo value, $Res Function(GlassLayerInfo) _then) = _$GlassLayerInfoCopyWithImpl;
@override @useResult
$Res call({
String id, String name, GlassStyle style, double offsetX, double offsetY, double width, double height, double rotation, double scale, double borderRadius, double blurIntensity, double opacity, double borderOpacity, double highlightStrength, bool showHighlight, bool showInnerShadow, Color tintColor, bool visible, bool locked, int zIndex, List<String> containedTextIds, List<String> containedStickerIds
});
}
/// @nodoc
class _$GlassLayerInfoCopyWithImpl<$Res>
implements $GlassLayerInfoCopyWith<$Res> {
_$GlassLayerInfoCopyWithImpl(this._self, this._then);
final GlassLayerInfo _self;
final $Res Function(GlassLayerInfo) _then;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? style = null,Object? offsetX = null,Object? offsetY = null,Object? width = null,Object? height = null,Object? rotation = null,Object? scale = null,Object? borderRadius = null,Object? blurIntensity = null,Object? opacity = null,Object? borderOpacity = null,Object? highlightStrength = null,Object? showHighlight = null,Object? showInnerShadow = null,Object? tintColor = null,Object? visible = null,Object? locked = null,Object? zIndex = null,Object? containedTextIds = null,Object? containedStickerIds = null,}) {
return _then(GlassLayerInfo(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,style: null == style ? _self.style : style // ignore: cast_nullable_to_non_nullable
as GlassStyle,offsetX: null == offsetX ? _self.offsetX : offsetX // ignore: cast_nullable_to_non_nullable
as double,offsetY: null == offsetY ? _self.offsetY : offsetY // ignore: cast_nullable_to_non_nullable
as double,width: null == width ? _self.width : width // ignore: cast_nullable_to_non_nullable
as double,height: null == height ? _self.height : height // ignore: cast_nullable_to_non_nullable
as double,rotation: null == rotation ? _self.rotation : rotation // ignore: cast_nullable_to_non_nullable
as double,scale: null == scale ? _self.scale : scale // ignore: cast_nullable_to_non_nullable
as double,borderRadius: null == borderRadius ? _self.borderRadius : borderRadius // ignore: cast_nullable_to_non_nullable
as double,blurIntensity: null == blurIntensity ? _self.blurIntensity : blurIntensity // ignore: cast_nullable_to_non_nullable
as double,opacity: null == opacity ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable
as double,borderOpacity: null == borderOpacity ? _self.borderOpacity : borderOpacity // ignore: cast_nullable_to_non_nullable
as double,highlightStrength: null == highlightStrength ? _self.highlightStrength : highlightStrength // ignore: cast_nullable_to_non_nullable
as double,showHighlight: null == showHighlight ? _self.showHighlight : showHighlight // ignore: cast_nullable_to_non_nullable
as bool,showInnerShadow: null == showInnerShadow ? _self.showInnerShadow : showInnerShadow // ignore: cast_nullable_to_non_nullable
as bool,tintColor: null == tintColor ? _self.tintColor : tintColor // ignore: cast_nullable_to_non_nullable
as Color,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
as bool,locked: null == locked ? _self.locked : locked // ignore: cast_nullable_to_non_nullable
as bool,zIndex: null == zIndex ? _self.zIndex : zIndex // ignore: cast_nullable_to_non_nullable
as int,containedTextIds: null == containedTextIds ? _self._containedTextIds : containedTextIds // ignore: cast_nullable_to_non_nullable
as List<String>,containedStickerIds: null == containedStickerIds ? _self._containedStickerIds : containedStickerIds // ignore: cast_nullable_to_non_nullable
as List<String>,
));
}
}
/// @nodoc
class AnnotationLayerInfo extends LayerInfo {
const AnnotationLayerInfo({required this.id, this.name = '', required this.annotationType, required final List<AnnotationPoint> points, this.strokeWidth = 3.0, this.color = Colors.red, this.opacity = 1.0, this.visible = true, this.locked = false, this.zIndex = 0}): _points = points,super._();
@override final String id;
@override@JsonKey() final String name;
final AnnotationType annotationType;
final List<AnnotationPoint> _points;
List<AnnotationPoint> get points {
if (_points is EqualUnmodifiableListView) return _points;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_points);
}
@JsonKey() final double strokeWidth;
@JsonKey() final Color color;
@override@JsonKey() final double opacity;
@override@JsonKey() final bool visible;
@override@JsonKey() final bool locked;
@override@JsonKey() final int zIndex;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AnnotationLayerInfoCopyWith<AnnotationLayerInfo> get copyWith => _$AnnotationLayerInfoCopyWithImpl<AnnotationLayerInfo>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AnnotationLayerInfo&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.annotationType, annotationType) || other.annotationType == annotationType)&&const DeepCollectionEquality().equals(other._points, _points)&&(identical(other.strokeWidth, strokeWidth) || other.strokeWidth == strokeWidth)&&(identical(other.color, color) || other.color == color)&&(identical(other.opacity, opacity) || other.opacity == opacity)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.locked, locked) || other.locked == locked)&&(identical(other.zIndex, zIndex) || other.zIndex == zIndex));
}
@override
int get hashCode => Object.hash(runtimeType,id,name,annotationType,const DeepCollectionEquality().hash(_points),strokeWidth,color,opacity,visible,locked,zIndex);
@override
String toString() {
return 'LayerInfo.annotation(id: $id, name: $name, annotationType: $annotationType, points: $points, strokeWidth: $strokeWidth, color: $color, opacity: $opacity, visible: $visible, locked: $locked, zIndex: $zIndex)';
}
}
/// @nodoc
abstract mixin class $AnnotationLayerInfoCopyWith<$Res> implements $LayerInfoCopyWith<$Res> {
factory $AnnotationLayerInfoCopyWith(AnnotationLayerInfo value, $Res Function(AnnotationLayerInfo) _then) = _$AnnotationLayerInfoCopyWithImpl;
@override @useResult
$Res call({
String id, String name, AnnotationType annotationType, List<AnnotationPoint> points, double strokeWidth, Color color, double opacity, bool visible, bool locked, int zIndex
});
}
/// @nodoc
class _$AnnotationLayerInfoCopyWithImpl<$Res>
implements $AnnotationLayerInfoCopyWith<$Res> {
_$AnnotationLayerInfoCopyWithImpl(this._self, this._then);
final AnnotationLayerInfo _self;
final $Res Function(AnnotationLayerInfo) _then;
/// Create a copy of LayerInfo
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? annotationType = null,Object? points = null,Object? strokeWidth = null,Object? color = null,Object? opacity = null,Object? visible = null,Object? locked = null,Object? zIndex = null,}) {
return _then(AnnotationLayerInfo(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,annotationType: null == annotationType ? _self.annotationType : annotationType // ignore: cast_nullable_to_non_nullable
as AnnotationType,points: null == points ? _self._points : points // ignore: cast_nullable_to_non_nullable
as List<AnnotationPoint>,strokeWidth: null == strokeWidth ? _self.strokeWidth : strokeWidth // ignore: cast_nullable_to_non_nullable
as double,color: null == color ? _self.color : color // ignore: cast_nullable_to_non_nullable
as Color,opacity: null == opacity ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable
as double,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
as bool,locked: null == locked ? _self.locked : locked // ignore: cast_nullable_to_non_nullable
as bool,zIndex: null == zIndex ? _self.zIndex : zIndex // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
// dart format on