Files
xianyan/lib/editor/models/editor_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

1573 lines
91 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 'editor_models.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$TextLayer {
String get id; String get text; double get fontSize; FontWeight get fontWeight; String get fontFamily; Color get color; TextAlignMode get textAlign; double get offsetX; double get offsetY; double get rotation; double get scale; double get letterSpacing; double get lineHeight; bool get italic; bool get underline; bool get strikethrough; Color? get strokeColor; double get strokeWidth; Color? get shadowColor; double get shadowBlur; double get shadowOffsetX; double get shadowOffsetY; bool get visible; bool get locked; int get zIndex; double get opacity; String get name;
/// Create a copy of TextLayer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TextLayerCopyWith<TextLayer> get copyWith => _$TextLayerCopyWithImpl<TextLayer>(this as TextLayer, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TextLayer&&(identical(other.id, id) || other.id == id)&&(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.zIndex, zIndex) || other.zIndex == zIndex)&&(identical(other.opacity, opacity) || other.opacity == opacity)&&(identical(other.name, name) || other.name == name));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,text,fontSize,fontWeight,fontFamily,color,textAlign,offsetX,offsetY,rotation,scale,letterSpacing,lineHeight,italic,underline,strikethrough,strokeColor,strokeWidth,shadowColor,shadowBlur,shadowOffsetX,shadowOffsetY,visible,locked,zIndex,opacity,name]);
@override
String toString() {
return 'TextLayer(id: $id, 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, zIndex: $zIndex, opacity: $opacity, name: $name)';
}
}
/// @nodoc
abstract mixin class $TextLayerCopyWith<$Res> {
factory $TextLayerCopyWith(TextLayer value, $Res Function(TextLayer) _then) = _$TextLayerCopyWithImpl;
@useResult
$Res call({
String id, 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, int zIndex, double opacity, String name
});
}
/// @nodoc
class _$TextLayerCopyWithImpl<$Res>
implements $TextLayerCopyWith<$Res> {
_$TextLayerCopyWithImpl(this._self, this._then);
final TextLayer _self;
final $Res Function(TextLayer) _then;
/// Create a copy of TextLayer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = 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? zIndex = null,Object? opacity = null,Object? name = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // 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,zIndex: null == zIndex ? _self.zIndex : zIndex // ignore: cast_nullable_to_non_nullable
as int,opacity: null == opacity ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable
as double,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [TextLayer].
extension TextLayerPatterns on TextLayer {
/// 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( _TextLayer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _TextLayer() when $default != null:
return $default(_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?>(TResult Function( _TextLayer value) $default,){
final _that = this;
switch (_that) {
case _TextLayer():
return $default(_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( _TextLayer value)? $default,){
final _that = this;
switch (_that) {
case _TextLayer() when $default != null:
return $default(_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 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, int zIndex, double opacity, String name)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _TextLayer() when $default != null:
return $default(_that.id,_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.zIndex,_that.opacity,_that.name);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?>(TResult Function( String id, 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, int zIndex, double opacity, String name) $default,) {final _that = this;
switch (_that) {
case _TextLayer():
return $default(_that.id,_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.zIndex,_that.opacity,_that.name);}
}
/// 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 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, int zIndex, double opacity, String name)? $default,) {final _that = this;
switch (_that) {
case _TextLayer() when $default != null:
return $default(_that.id,_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.zIndex,_that.opacity,_that.name);case _:
return null;
}
}
}
/// @nodoc
class _TextLayer extends TextLayer {
const _TextLayer({required this.id, 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.zIndex = 0, this.opacity = 1.0, this.name = ''}): super._();
@override final String id;
@override final String text;
@override@JsonKey() final double fontSize;
@override@JsonKey() final FontWeight fontWeight;
@override@JsonKey() final String fontFamily;
@override@JsonKey() final Color color;
@override@JsonKey() final TextAlignMode textAlign;
@override@JsonKey() final double offsetX;
@override@JsonKey() final double offsetY;
@override@JsonKey() final double rotation;
@override@JsonKey() final double scale;
@override@JsonKey() final double letterSpacing;
@override@JsonKey() final double lineHeight;
@override@JsonKey() final bool italic;
@override@JsonKey() final bool underline;
@override@JsonKey() final bool strikethrough;
@override final Color? strokeColor;
@override@JsonKey() final double strokeWidth;
@override final Color? shadowColor;
@override@JsonKey() final double shadowBlur;
@override@JsonKey() final double shadowOffsetX;
@override@JsonKey() final double shadowOffsetY;
@override@JsonKey() final bool visible;
@override@JsonKey() final bool locked;
@override@JsonKey() final int zIndex;
@override@JsonKey() final double opacity;
@override@JsonKey() final String name;
/// Create a copy of TextLayer
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$TextLayerCopyWith<_TextLayer> get copyWith => __$TextLayerCopyWithImpl<_TextLayer>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TextLayer&&(identical(other.id, id) || other.id == id)&&(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.zIndex, zIndex) || other.zIndex == zIndex)&&(identical(other.opacity, opacity) || other.opacity == opacity)&&(identical(other.name, name) || other.name == name));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,text,fontSize,fontWeight,fontFamily,color,textAlign,offsetX,offsetY,rotation,scale,letterSpacing,lineHeight,italic,underline,strikethrough,strokeColor,strokeWidth,shadowColor,shadowBlur,shadowOffsetX,shadowOffsetY,visible,locked,zIndex,opacity,name]);
@override
String toString() {
return 'TextLayer(id: $id, 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, zIndex: $zIndex, opacity: $opacity, name: $name)';
}
}
/// @nodoc
abstract mixin class _$TextLayerCopyWith<$Res> implements $TextLayerCopyWith<$Res> {
factory _$TextLayerCopyWith(_TextLayer value, $Res Function(_TextLayer) _then) = __$TextLayerCopyWithImpl;
@override @useResult
$Res call({
String id, 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, int zIndex, double opacity, String name
});
}
/// @nodoc
class __$TextLayerCopyWithImpl<$Res>
implements _$TextLayerCopyWith<$Res> {
__$TextLayerCopyWithImpl(this._self, this._then);
final _TextLayer _self;
final $Res Function(_TextLayer) _then;
/// Create a copy of TextLayer
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = 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? zIndex = null,Object? opacity = null,Object? name = null,}) {
return _then(_TextLayer(
id: null == id ? _self.id : id // 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,zIndex: null == zIndex ? _self.zIndex : zIndex // ignore: cast_nullable_to_non_nullable
as int,opacity: null == opacity ? _self.opacity : opacity // ignore: cast_nullable_to_non_nullable
as double,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$BackgroundLayer {
BackgroundType get type; Color get solidColor; List<Color> get gradientColors; List<double> get gradientStops; double get gradientAngle; Alignment get gradientBegin; Alignment get gradientEnd; String? get imagePath; double get blurSigma; double get imageOpacity;
/// Create a copy of BackgroundLayer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$BackgroundLayerCopyWith<BackgroundLayer> get copyWith => _$BackgroundLayerCopyWithImpl<BackgroundLayer>(this as BackgroundLayer, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is BackgroundLayer&&(identical(other.type, type) || other.type == type)&&(identical(other.solidColor, solidColor) || other.solidColor == solidColor)&&const DeepCollectionEquality().equals(other.gradientColors, gradientColors)&&const DeepCollectionEquality().equals(other.gradientStops, gradientStops)&&(identical(other.gradientAngle, gradientAngle) || other.gradientAngle == gradientAngle)&&(identical(other.gradientBegin, gradientBegin) || other.gradientBegin == gradientBegin)&&(identical(other.gradientEnd, gradientEnd) || other.gradientEnd == gradientEnd)&&(identical(other.imagePath, imagePath) || other.imagePath == imagePath)&&(identical(other.blurSigma, blurSigma) || other.blurSigma == blurSigma)&&(identical(other.imageOpacity, imageOpacity) || other.imageOpacity == imageOpacity));
}
@override
int get hashCode => Object.hash(runtimeType,type,solidColor,const DeepCollectionEquality().hash(gradientColors),const DeepCollectionEquality().hash(gradientStops),gradientAngle,gradientBegin,gradientEnd,imagePath,blurSigma,imageOpacity);
@override
String toString() {
return 'BackgroundLayer(type: $type, solidColor: $solidColor, gradientColors: $gradientColors, gradientStops: $gradientStops, gradientAngle: $gradientAngle, gradientBegin: $gradientBegin, gradientEnd: $gradientEnd, imagePath: $imagePath, blurSigma: $blurSigma, imageOpacity: $imageOpacity)';
}
}
/// @nodoc
abstract mixin class $BackgroundLayerCopyWith<$Res> {
factory $BackgroundLayerCopyWith(BackgroundLayer value, $Res Function(BackgroundLayer) _then) = _$BackgroundLayerCopyWithImpl;
@useResult
$Res call({
BackgroundType type, Color solidColor, List<Color> gradientColors, List<double> gradientStops, double gradientAngle, Alignment gradientBegin, Alignment gradientEnd, String? imagePath, double blurSigma, double imageOpacity
});
}
/// @nodoc
class _$BackgroundLayerCopyWithImpl<$Res>
implements $BackgroundLayerCopyWith<$Res> {
_$BackgroundLayerCopyWithImpl(this._self, this._then);
final BackgroundLayer _self;
final $Res Function(BackgroundLayer) _then;
/// Create a copy of BackgroundLayer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? solidColor = null,Object? gradientColors = null,Object? gradientStops = null,Object? gradientAngle = null,Object? gradientBegin = null,Object? gradientEnd = null,Object? imagePath = freezed,Object? blurSigma = null,Object? imageOpacity = null,}) {
return _then(_self.copyWith(
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as BackgroundType,solidColor: null == solidColor ? _self.solidColor : solidColor // ignore: cast_nullable_to_non_nullable
as Color,gradientColors: null == gradientColors ? _self.gradientColors : gradientColors // ignore: cast_nullable_to_non_nullable
as List<Color>,gradientStops: null == gradientStops ? _self.gradientStops : gradientStops // ignore: cast_nullable_to_non_nullable
as List<double>,gradientAngle: null == gradientAngle ? _self.gradientAngle : gradientAngle // ignore: cast_nullable_to_non_nullable
as double,gradientBegin: null == gradientBegin ? _self.gradientBegin : gradientBegin // ignore: cast_nullable_to_non_nullable
as Alignment,gradientEnd: null == gradientEnd ? _self.gradientEnd : gradientEnd // ignore: cast_nullable_to_non_nullable
as Alignment,imagePath: freezed == imagePath ? _self.imagePath : imagePath // ignore: cast_nullable_to_non_nullable
as String?,blurSigma: null == blurSigma ? _self.blurSigma : blurSigma // ignore: cast_nullable_to_non_nullable
as double,imageOpacity: null == imageOpacity ? _self.imageOpacity : imageOpacity // ignore: cast_nullable_to_non_nullable
as double,
));
}
}
/// Adds pattern-matching-related methods to [BackgroundLayer].
extension BackgroundLayerPatterns on BackgroundLayer {
/// 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( _BackgroundLayer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _BackgroundLayer() when $default != null:
return $default(_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?>(TResult Function( _BackgroundLayer value) $default,){
final _that = this;
switch (_that) {
case _BackgroundLayer():
return $default(_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( _BackgroundLayer value)? $default,){
final _that = this;
switch (_that) {
case _BackgroundLayer() when $default != null:
return $default(_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( BackgroundType type, Color solidColor, List<Color> gradientColors, List<double> gradientStops, double gradientAngle, Alignment gradientBegin, Alignment gradientEnd, String? imagePath, double blurSigma, double imageOpacity)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _BackgroundLayer() when $default != null:
return $default(_that.type,_that.solidColor,_that.gradientColors,_that.gradientStops,_that.gradientAngle,_that.gradientBegin,_that.gradientEnd,_that.imagePath,_that.blurSigma,_that.imageOpacity);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?>(TResult Function( BackgroundType type, Color solidColor, List<Color> gradientColors, List<double> gradientStops, double gradientAngle, Alignment gradientBegin, Alignment gradientEnd, String? imagePath, double blurSigma, double imageOpacity) $default,) {final _that = this;
switch (_that) {
case _BackgroundLayer():
return $default(_that.type,_that.solidColor,_that.gradientColors,_that.gradientStops,_that.gradientAngle,_that.gradientBegin,_that.gradientEnd,_that.imagePath,_that.blurSigma,_that.imageOpacity);}
}
/// 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( BackgroundType type, Color solidColor, List<Color> gradientColors, List<double> gradientStops, double gradientAngle, Alignment gradientBegin, Alignment gradientEnd, String? imagePath, double blurSigma, double imageOpacity)? $default,) {final _that = this;
switch (_that) {
case _BackgroundLayer() when $default != null:
return $default(_that.type,_that.solidColor,_that.gradientColors,_that.gradientStops,_that.gradientAngle,_that.gradientBegin,_that.gradientEnd,_that.imagePath,_that.blurSigma,_that.imageOpacity);case _:
return null;
}
}
}
/// @nodoc
class _BackgroundLayer extends BackgroundLayer {
const _BackgroundLayer({this.type = BackgroundType.solid, this.solidColor = LightColors.primary, final List<Color> gradientColors = const [Color(0xFF6C63FF), Color(0xFF4ECDC4)], final List<double> gradientStops = const [0.0, 1.0], this.gradientAngle = 135.0, this.gradientBegin = Alignment.topCenter, this.gradientEnd = Alignment.bottomCenter, this.imagePath, this.blurSigma = 0.0, this.imageOpacity = 1.0}): _gradientColors = gradientColors,_gradientStops = gradientStops,super._();
@override@JsonKey() final BackgroundType type;
@override@JsonKey() final Color solidColor;
final List<Color> _gradientColors;
@override@JsonKey() List<Color> get gradientColors {
if (_gradientColors is EqualUnmodifiableListView) return _gradientColors;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_gradientColors);
}
final List<double> _gradientStops;
@override@JsonKey() List<double> get gradientStops {
if (_gradientStops is EqualUnmodifiableListView) return _gradientStops;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_gradientStops);
}
@override@JsonKey() final double gradientAngle;
@override@JsonKey() final Alignment gradientBegin;
@override@JsonKey() final Alignment gradientEnd;
@override final String? imagePath;
@override@JsonKey() final double blurSigma;
@override@JsonKey() final double imageOpacity;
/// Create a copy of BackgroundLayer
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$BackgroundLayerCopyWith<_BackgroundLayer> get copyWith => __$BackgroundLayerCopyWithImpl<_BackgroundLayer>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BackgroundLayer&&(identical(other.type, type) || other.type == type)&&(identical(other.solidColor, solidColor) || other.solidColor == solidColor)&&const DeepCollectionEquality().equals(other._gradientColors, _gradientColors)&&const DeepCollectionEquality().equals(other._gradientStops, _gradientStops)&&(identical(other.gradientAngle, gradientAngle) || other.gradientAngle == gradientAngle)&&(identical(other.gradientBegin, gradientBegin) || other.gradientBegin == gradientBegin)&&(identical(other.gradientEnd, gradientEnd) || other.gradientEnd == gradientEnd)&&(identical(other.imagePath, imagePath) || other.imagePath == imagePath)&&(identical(other.blurSigma, blurSigma) || other.blurSigma == blurSigma)&&(identical(other.imageOpacity, imageOpacity) || other.imageOpacity == imageOpacity));
}
@override
int get hashCode => Object.hash(runtimeType,type,solidColor,const DeepCollectionEquality().hash(_gradientColors),const DeepCollectionEquality().hash(_gradientStops),gradientAngle,gradientBegin,gradientEnd,imagePath,blurSigma,imageOpacity);
@override
String toString() {
return 'BackgroundLayer(type: $type, solidColor: $solidColor, gradientColors: $gradientColors, gradientStops: $gradientStops, gradientAngle: $gradientAngle, gradientBegin: $gradientBegin, gradientEnd: $gradientEnd, imagePath: $imagePath, blurSigma: $blurSigma, imageOpacity: $imageOpacity)';
}
}
/// @nodoc
abstract mixin class _$BackgroundLayerCopyWith<$Res> implements $BackgroundLayerCopyWith<$Res> {
factory _$BackgroundLayerCopyWith(_BackgroundLayer value, $Res Function(_BackgroundLayer) _then) = __$BackgroundLayerCopyWithImpl;
@override @useResult
$Res call({
BackgroundType type, Color solidColor, List<Color> gradientColors, List<double> gradientStops, double gradientAngle, Alignment gradientBegin, Alignment gradientEnd, String? imagePath, double blurSigma, double imageOpacity
});
}
/// @nodoc
class __$BackgroundLayerCopyWithImpl<$Res>
implements _$BackgroundLayerCopyWith<$Res> {
__$BackgroundLayerCopyWithImpl(this._self, this._then);
final _BackgroundLayer _self;
final $Res Function(_BackgroundLayer) _then;
/// Create a copy of BackgroundLayer
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? solidColor = null,Object? gradientColors = null,Object? gradientStops = null,Object? gradientAngle = null,Object? gradientBegin = null,Object? gradientEnd = null,Object? imagePath = freezed,Object? blurSigma = null,Object? imageOpacity = null,}) {
return _then(_BackgroundLayer(
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as BackgroundType,solidColor: null == solidColor ? _self.solidColor : solidColor // ignore: cast_nullable_to_non_nullable
as Color,gradientColors: null == gradientColors ? _self._gradientColors : gradientColors // ignore: cast_nullable_to_non_nullable
as List<Color>,gradientStops: null == gradientStops ? _self._gradientStops : gradientStops // ignore: cast_nullable_to_non_nullable
as List<double>,gradientAngle: null == gradientAngle ? _self.gradientAngle : gradientAngle // ignore: cast_nullable_to_non_nullable
as double,gradientBegin: null == gradientBegin ? _self.gradientBegin : gradientBegin // ignore: cast_nullable_to_non_nullable
as Alignment,gradientEnd: null == gradientEnd ? _self.gradientEnd : gradientEnd // ignore: cast_nullable_to_non_nullable
as Alignment,imagePath: freezed == imagePath ? _self.imagePath : imagePath // ignore: cast_nullable_to_non_nullable
as String?,blurSigma: null == blurSigma ? _self.blurSigma : blurSigma // ignore: cast_nullable_to_non_nullable
as double,imageOpacity: null == imageOpacity ? _self.imageOpacity : imageOpacity // ignore: cast_nullable_to_non_nullable
as double,
));
}
}
/// @nodoc
mixin _$GlassCardLayer {
String get id; GlassStyle get style; double get offsetX; double get offsetY; double get width; double get height; double get rotation; double get scale; double get borderRadius; double get blurIntensity; double get opacity; double get borderOpacity; double get highlightStrength; bool get showHighlight; bool get showInnerShadow; Color get tintColor; bool get visible; bool get locked; int get zIndex; List<String> get containedTextIds; List<String> get containedStickerIds; String get name;
/// Create a copy of GlassCardLayer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$GlassCardLayerCopyWith<GlassCardLayer> get copyWith => _$GlassCardLayerCopyWithImpl<GlassCardLayer>(this as GlassCardLayer, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is GlassCardLayer&&(identical(other.id, id) || other.id == id)&&(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)&&(identical(other.name, name) || other.name == name));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,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),name]);
@override
String toString() {
return 'GlassCardLayer(id: $id, 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, name: $name)';
}
}
/// @nodoc
abstract mixin class $GlassCardLayerCopyWith<$Res> {
factory $GlassCardLayerCopyWith(GlassCardLayer value, $Res Function(GlassCardLayer) _then) = _$GlassCardLayerCopyWithImpl;
@useResult
$Res call({
String id, 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, String name
});
}
/// @nodoc
class _$GlassCardLayerCopyWithImpl<$Res>
implements $GlassCardLayerCopyWith<$Res> {
_$GlassCardLayerCopyWithImpl(this._self, this._then);
final GlassCardLayer _self;
final $Res Function(GlassCardLayer) _then;
/// Create a copy of GlassCardLayer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = 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,Object? name = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // 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>,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [GlassCardLayer].
extension GlassCardLayerPatterns on GlassCardLayer {
/// 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( _GlassCardLayer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _GlassCardLayer() when $default != null:
return $default(_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?>(TResult Function( _GlassCardLayer value) $default,){
final _that = this;
switch (_that) {
case _GlassCardLayer():
return $default(_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( _GlassCardLayer value)? $default,){
final _that = this;
switch (_that) {
case _GlassCardLayer() when $default != null:
return $default(_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, 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, String name)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _GlassCardLayer() when $default != null:
return $default(_that.id,_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,_that.name);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?>(TResult Function( String id, 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, String name) $default,) {final _that = this;
switch (_that) {
case _GlassCardLayer():
return $default(_that.id,_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,_that.name);}
}
/// 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, 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, String name)? $default,) {final _that = this;
switch (_that) {
case _GlassCardLayer() when $default != null:
return $default(_that.id,_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,_that.name);case _:
return null;
}
}
}
/// @nodoc
class _GlassCardLayer extends GlassCardLayer {
const _GlassCardLayer({required this.id, 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>[], this.name = ''}): _containedTextIds = containedTextIds,_containedStickerIds = containedStickerIds,super._();
@override final String id;
@override@JsonKey() final GlassStyle style;
@override@JsonKey() final double offsetX;
@override@JsonKey() final double offsetY;
@override@JsonKey() final double width;
@override@JsonKey() final double height;
@override@JsonKey() final double rotation;
@override@JsonKey() final double scale;
@override@JsonKey() final double borderRadius;
@override@JsonKey() final double blurIntensity;
@override@JsonKey() final double opacity;
@override@JsonKey() final double borderOpacity;
@override@JsonKey() final double highlightStrength;
@override@JsonKey() final bool showHighlight;
@override@JsonKey() final bool showInnerShadow;
@override@JsonKey() final Color tintColor;
@override@JsonKey() final bool visible;
@override@JsonKey() final bool locked;
@override@JsonKey() final int zIndex;
final List<String> _containedTextIds;
@override@JsonKey() List<String> get containedTextIds {
if (_containedTextIds is EqualUnmodifiableListView) return _containedTextIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_containedTextIds);
}
final List<String> _containedStickerIds;
@override@JsonKey() List<String> get containedStickerIds {
if (_containedStickerIds is EqualUnmodifiableListView) return _containedStickerIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_containedStickerIds);
}
@override@JsonKey() final String name;
/// Create a copy of GlassCardLayer
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$GlassCardLayerCopyWith<_GlassCardLayer> get copyWith => __$GlassCardLayerCopyWithImpl<_GlassCardLayer>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GlassCardLayer&&(identical(other.id, id) || other.id == id)&&(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)&&(identical(other.name, name) || other.name == name));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,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),name]);
@override
String toString() {
return 'GlassCardLayer(id: $id, 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, name: $name)';
}
}
/// @nodoc
abstract mixin class _$GlassCardLayerCopyWith<$Res> implements $GlassCardLayerCopyWith<$Res> {
factory _$GlassCardLayerCopyWith(_GlassCardLayer value, $Res Function(_GlassCardLayer) _then) = __$GlassCardLayerCopyWithImpl;
@override @useResult
$Res call({
String id, 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, String name
});
}
/// @nodoc
class __$GlassCardLayerCopyWithImpl<$Res>
implements _$GlassCardLayerCopyWith<$Res> {
__$GlassCardLayerCopyWithImpl(this._self, this._then);
final _GlassCardLayer _self;
final $Res Function(_GlassCardLayer) _then;
/// Create a copy of GlassCardLayer
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = 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,Object? name = null,}) {
return _then(_GlassCardLayer(
id: null == id ? _self.id : id // 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>,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$StickerLayer {
String get id; StickerType get type; String get assetPath; double get size; double get offsetX; double get offsetY; double get rotation; double get scale; double get opacity; bool get visible; bool get locked; int get zIndex; String get name;
/// Create a copy of StickerLayer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$StickerLayerCopyWith<StickerLayer> get copyWith => _$StickerLayerCopyWithImpl<StickerLayer>(this as StickerLayer, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is StickerLayer&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(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)&&(identical(other.name, name) || other.name == name));
}
@override
int get hashCode => Object.hash(runtimeType,id,type,assetPath,size,offsetX,offsetY,rotation,scale,opacity,visible,locked,zIndex,name);
@override
String toString() {
return 'StickerLayer(id: $id, type: $type, assetPath: $assetPath, size: $size, offsetX: $offsetX, offsetY: $offsetY, rotation: $rotation, scale: $scale, opacity: $opacity, visible: $visible, locked: $locked, zIndex: $zIndex, name: $name)';
}
}
/// @nodoc
abstract mixin class $StickerLayerCopyWith<$Res> {
factory $StickerLayerCopyWith(StickerLayer value, $Res Function(StickerLayer) _then) = _$StickerLayerCopyWithImpl;
@useResult
$Res call({
String id, StickerType type, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex, String name
});
}
/// @nodoc
class _$StickerLayerCopyWithImpl<$Res>
implements $StickerLayerCopyWith<$Res> {
_$StickerLayerCopyWithImpl(this._self, this._then);
final StickerLayer _self;
final $Res Function(StickerLayer) _then;
/// Create a copy of StickerLayer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? type = 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,Object? name = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // 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,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [StickerLayer].
extension StickerLayerPatterns on StickerLayer {
/// 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( _StickerLayer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _StickerLayer() when $default != null:
return $default(_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?>(TResult Function( _StickerLayer value) $default,){
final _that = this;
switch (_that) {
case _StickerLayer():
return $default(_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( _StickerLayer value)? $default,){
final _that = this;
switch (_that) {
case _StickerLayer() when $default != null:
return $default(_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, StickerType type, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex, String name)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _StickerLayer() when $default != null:
return $default(_that.id,_that.type,_that.assetPath,_that.size,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.opacity,_that.visible,_that.locked,_that.zIndex,_that.name);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?>(TResult Function( String id, StickerType type, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex, String name) $default,) {final _that = this;
switch (_that) {
case _StickerLayer():
return $default(_that.id,_that.type,_that.assetPath,_that.size,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.opacity,_that.visible,_that.locked,_that.zIndex,_that.name);}
}
/// 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, StickerType type, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex, String name)? $default,) {final _that = this;
switch (_that) {
case _StickerLayer() when $default != null:
return $default(_that.id,_that.type,_that.assetPath,_that.size,_that.offsetX,_that.offsetY,_that.rotation,_that.scale,_that.opacity,_that.visible,_that.locked,_that.zIndex,_that.name);case _:
return null;
}
}
}
/// @nodoc
class _StickerLayer extends StickerLayer {
const _StickerLayer({required this.id, this.type = 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, this.name = ''}): super._();
@override final String id;
@override@JsonKey() final StickerType type;
@override final String assetPath;
@override@JsonKey() final double size;
@override@JsonKey() final double offsetX;
@override@JsonKey() final double offsetY;
@override@JsonKey() final double rotation;
@override@JsonKey() final double scale;
@override@JsonKey() final double opacity;
@override@JsonKey() final bool visible;
@override@JsonKey() final bool locked;
@override@JsonKey() final int zIndex;
@override@JsonKey() final String name;
/// Create a copy of StickerLayer
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$StickerLayerCopyWith<_StickerLayer> get copyWith => __$StickerLayerCopyWithImpl<_StickerLayer>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StickerLayer&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(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)&&(identical(other.name, name) || other.name == name));
}
@override
int get hashCode => Object.hash(runtimeType,id,type,assetPath,size,offsetX,offsetY,rotation,scale,opacity,visible,locked,zIndex,name);
@override
String toString() {
return 'StickerLayer(id: $id, type: $type, assetPath: $assetPath, size: $size, offsetX: $offsetX, offsetY: $offsetY, rotation: $rotation, scale: $scale, opacity: $opacity, visible: $visible, locked: $locked, zIndex: $zIndex, name: $name)';
}
}
/// @nodoc
abstract mixin class _$StickerLayerCopyWith<$Res> implements $StickerLayerCopyWith<$Res> {
factory _$StickerLayerCopyWith(_StickerLayer value, $Res Function(_StickerLayer) _then) = __$StickerLayerCopyWithImpl;
@override @useResult
$Res call({
String id, StickerType type, String assetPath, double size, double offsetX, double offsetY, double rotation, double scale, double opacity, bool visible, bool locked, int zIndex, String name
});
}
/// @nodoc
class __$StickerLayerCopyWithImpl<$Res>
implements _$StickerLayerCopyWith<$Res> {
__$StickerLayerCopyWithImpl(this._self, this._then);
final _StickerLayer _self;
final $Res Function(_StickerLayer) _then;
/// Create a copy of StickerLayer
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? type = 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,Object? name = null,}) {
return _then(_StickerLayer(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // 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,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$QuoteCanvasModel {
CanvasAspectRatio get aspectRatio; bool get showGrid; double get gridSize; BackgroundLayer get background; List<TextLayer> get textLayers; List<StickerLayer> get stickerLayers; List<GlassCardLayer> get glassCardLayers; WatermarkStyle get watermarkStyle; String? get watermarkText; String? get selectedLayerId; bool get isLiquidGlassMode; List<AnnotationLayer> get annotationLayers;
/// Create a copy of QuoteCanvasModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$QuoteCanvasModelCopyWith<QuoteCanvasModel> get copyWith => _$QuoteCanvasModelCopyWithImpl<QuoteCanvasModel>(this as QuoteCanvasModel, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is QuoteCanvasModel&&(identical(other.aspectRatio, aspectRatio) || other.aspectRatio == aspectRatio)&&(identical(other.showGrid, showGrid) || other.showGrid == showGrid)&&(identical(other.gridSize, gridSize) || other.gridSize == gridSize)&&(identical(other.background, background) || other.background == background)&&const DeepCollectionEquality().equals(other.textLayers, textLayers)&&const DeepCollectionEquality().equals(other.stickerLayers, stickerLayers)&&const DeepCollectionEquality().equals(other.glassCardLayers, glassCardLayers)&&(identical(other.watermarkStyle, watermarkStyle) || other.watermarkStyle == watermarkStyle)&&(identical(other.watermarkText, watermarkText) || other.watermarkText == watermarkText)&&(identical(other.selectedLayerId, selectedLayerId) || other.selectedLayerId == selectedLayerId)&&(identical(other.isLiquidGlassMode, isLiquidGlassMode) || other.isLiquidGlassMode == isLiquidGlassMode)&&const DeepCollectionEquality().equals(other.annotationLayers, annotationLayers));
}
@override
int get hashCode => Object.hash(runtimeType,aspectRatio,showGrid,gridSize,background,const DeepCollectionEquality().hash(textLayers),const DeepCollectionEquality().hash(stickerLayers),const DeepCollectionEquality().hash(glassCardLayers),watermarkStyle,watermarkText,selectedLayerId,isLiquidGlassMode,const DeepCollectionEquality().hash(annotationLayers));
@override
String toString() {
return 'QuoteCanvasModel(aspectRatio: $aspectRatio, showGrid: $showGrid, gridSize: $gridSize, background: $background, textLayers: $textLayers, stickerLayers: $stickerLayers, glassCardLayers: $glassCardLayers, watermarkStyle: $watermarkStyle, watermarkText: $watermarkText, selectedLayerId: $selectedLayerId, isLiquidGlassMode: $isLiquidGlassMode, annotationLayers: $annotationLayers)';
}
}
/// @nodoc
abstract mixin class $QuoteCanvasModelCopyWith<$Res> {
factory $QuoteCanvasModelCopyWith(QuoteCanvasModel value, $Res Function(QuoteCanvasModel) _then) = _$QuoteCanvasModelCopyWithImpl;
@useResult
$Res call({
CanvasAspectRatio aspectRatio, bool showGrid, double gridSize, BackgroundLayer background, List<TextLayer> textLayers, List<StickerLayer> stickerLayers, List<GlassCardLayer> glassCardLayers, WatermarkStyle watermarkStyle, String? watermarkText, String? selectedLayerId, bool isLiquidGlassMode, List<AnnotationLayer> annotationLayers
});
$BackgroundLayerCopyWith<$Res> get background;
}
/// @nodoc
class _$QuoteCanvasModelCopyWithImpl<$Res>
implements $QuoteCanvasModelCopyWith<$Res> {
_$QuoteCanvasModelCopyWithImpl(this._self, this._then);
final QuoteCanvasModel _self;
final $Res Function(QuoteCanvasModel) _then;
/// Create a copy of QuoteCanvasModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? aspectRatio = null,Object? showGrid = null,Object? gridSize = null,Object? background = null,Object? textLayers = null,Object? stickerLayers = null,Object? glassCardLayers = null,Object? watermarkStyle = null,Object? watermarkText = freezed,Object? selectedLayerId = freezed,Object? isLiquidGlassMode = null,Object? annotationLayers = null,}) {
return _then(_self.copyWith(
aspectRatio: null == aspectRatio ? _self.aspectRatio : aspectRatio // ignore: cast_nullable_to_non_nullable
as CanvasAspectRatio,showGrid: null == showGrid ? _self.showGrid : showGrid // ignore: cast_nullable_to_non_nullable
as bool,gridSize: null == gridSize ? _self.gridSize : gridSize // ignore: cast_nullable_to_non_nullable
as double,background: null == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
as BackgroundLayer,textLayers: null == textLayers ? _self.textLayers : textLayers // ignore: cast_nullable_to_non_nullable
as List<TextLayer>,stickerLayers: null == stickerLayers ? _self.stickerLayers : stickerLayers // ignore: cast_nullable_to_non_nullable
as List<StickerLayer>,glassCardLayers: null == glassCardLayers ? _self.glassCardLayers : glassCardLayers // ignore: cast_nullable_to_non_nullable
as List<GlassCardLayer>,watermarkStyle: null == watermarkStyle ? _self.watermarkStyle : watermarkStyle // ignore: cast_nullable_to_non_nullable
as WatermarkStyle,watermarkText: freezed == watermarkText ? _self.watermarkText : watermarkText // ignore: cast_nullable_to_non_nullable
as String?,selectedLayerId: freezed == selectedLayerId ? _self.selectedLayerId : selectedLayerId // ignore: cast_nullable_to_non_nullable
as String?,isLiquidGlassMode: null == isLiquidGlassMode ? _self.isLiquidGlassMode : isLiquidGlassMode // ignore: cast_nullable_to_non_nullable
as bool,annotationLayers: null == annotationLayers ? _self.annotationLayers : annotationLayers // ignore: cast_nullable_to_non_nullable
as List<AnnotationLayer>,
));
}
/// Create a copy of QuoteCanvasModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$BackgroundLayerCopyWith<$Res> get background {
return $BackgroundLayerCopyWith<$Res>(_self.background, (value) {
return _then(_self.copyWith(background: value));
});
}
}
/// Adds pattern-matching-related methods to [QuoteCanvasModel].
extension QuoteCanvasModelPatterns on QuoteCanvasModel {
/// 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( _QuoteCanvasModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _QuoteCanvasModel() when $default != null:
return $default(_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?>(TResult Function( _QuoteCanvasModel value) $default,){
final _that = this;
switch (_that) {
case _QuoteCanvasModel():
return $default(_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( _QuoteCanvasModel value)? $default,){
final _that = this;
switch (_that) {
case _QuoteCanvasModel() when $default != null:
return $default(_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( CanvasAspectRatio aspectRatio, bool showGrid, double gridSize, BackgroundLayer background, List<TextLayer> textLayers, List<StickerLayer> stickerLayers, List<GlassCardLayer> glassCardLayers, WatermarkStyle watermarkStyle, String? watermarkText, String? selectedLayerId, bool isLiquidGlassMode, List<AnnotationLayer> annotationLayers)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _QuoteCanvasModel() when $default != null:
return $default(_that.aspectRatio,_that.showGrid,_that.gridSize,_that.background,_that.textLayers,_that.stickerLayers,_that.glassCardLayers,_that.watermarkStyle,_that.watermarkText,_that.selectedLayerId,_that.isLiquidGlassMode,_that.annotationLayers);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?>(TResult Function( CanvasAspectRatio aspectRatio, bool showGrid, double gridSize, BackgroundLayer background, List<TextLayer> textLayers, List<StickerLayer> stickerLayers, List<GlassCardLayer> glassCardLayers, WatermarkStyle watermarkStyle, String? watermarkText, String? selectedLayerId, bool isLiquidGlassMode, List<AnnotationLayer> annotationLayers) $default,) {final _that = this;
switch (_that) {
case _QuoteCanvasModel():
return $default(_that.aspectRatio,_that.showGrid,_that.gridSize,_that.background,_that.textLayers,_that.stickerLayers,_that.glassCardLayers,_that.watermarkStyle,_that.watermarkText,_that.selectedLayerId,_that.isLiquidGlassMode,_that.annotationLayers);}
}
/// 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( CanvasAspectRatio aspectRatio, bool showGrid, double gridSize, BackgroundLayer background, List<TextLayer> textLayers, List<StickerLayer> stickerLayers, List<GlassCardLayer> glassCardLayers, WatermarkStyle watermarkStyle, String? watermarkText, String? selectedLayerId, bool isLiquidGlassMode, List<AnnotationLayer> annotationLayers)? $default,) {final _that = this;
switch (_that) {
case _QuoteCanvasModel() when $default != null:
return $default(_that.aspectRatio,_that.showGrid,_that.gridSize,_that.background,_that.textLayers,_that.stickerLayers,_that.glassCardLayers,_that.watermarkStyle,_that.watermarkText,_that.selectedLayerId,_that.isLiquidGlassMode,_that.annotationLayers);case _:
return null;
}
}
}
/// @nodoc
class _QuoteCanvasModel extends QuoteCanvasModel {
const _QuoteCanvasModel({this.aspectRatio = CanvasAspectRatio.ratio4_3, this.showGrid = false, this.gridSize = 40.0, this.background = const BackgroundLayer(), final List<TextLayer> textLayers = const [], final List<StickerLayer> stickerLayers = const [], final List<GlassCardLayer> glassCardLayers = const [], this.watermarkStyle = WatermarkStyle.none, this.watermarkText, this.selectedLayerId, this.isLiquidGlassMode = false, final List<AnnotationLayer> annotationLayers = const []}): _textLayers = textLayers,_stickerLayers = stickerLayers,_glassCardLayers = glassCardLayers,_annotationLayers = annotationLayers,super._();
@override@JsonKey() final CanvasAspectRatio aspectRatio;
@override@JsonKey() final bool showGrid;
@override@JsonKey() final double gridSize;
@override@JsonKey() final BackgroundLayer background;
final List<TextLayer> _textLayers;
@override@JsonKey() List<TextLayer> get textLayers {
if (_textLayers is EqualUnmodifiableListView) return _textLayers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_textLayers);
}
final List<StickerLayer> _stickerLayers;
@override@JsonKey() List<StickerLayer> get stickerLayers {
if (_stickerLayers is EqualUnmodifiableListView) return _stickerLayers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_stickerLayers);
}
final List<GlassCardLayer> _glassCardLayers;
@override@JsonKey() List<GlassCardLayer> get glassCardLayers {
if (_glassCardLayers is EqualUnmodifiableListView) return _glassCardLayers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_glassCardLayers);
}
@override@JsonKey() final WatermarkStyle watermarkStyle;
@override final String? watermarkText;
@override final String? selectedLayerId;
@override@JsonKey() final bool isLiquidGlassMode;
final List<AnnotationLayer> _annotationLayers;
@override@JsonKey() List<AnnotationLayer> get annotationLayers {
if (_annotationLayers is EqualUnmodifiableListView) return _annotationLayers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_annotationLayers);
}
/// Create a copy of QuoteCanvasModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$QuoteCanvasModelCopyWith<_QuoteCanvasModel> get copyWith => __$QuoteCanvasModelCopyWithImpl<_QuoteCanvasModel>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _QuoteCanvasModel&&(identical(other.aspectRatio, aspectRatio) || other.aspectRatio == aspectRatio)&&(identical(other.showGrid, showGrid) || other.showGrid == showGrid)&&(identical(other.gridSize, gridSize) || other.gridSize == gridSize)&&(identical(other.background, background) || other.background == background)&&const DeepCollectionEquality().equals(other._textLayers, _textLayers)&&const DeepCollectionEquality().equals(other._stickerLayers, _stickerLayers)&&const DeepCollectionEquality().equals(other._glassCardLayers, _glassCardLayers)&&(identical(other.watermarkStyle, watermarkStyle) || other.watermarkStyle == watermarkStyle)&&(identical(other.watermarkText, watermarkText) || other.watermarkText == watermarkText)&&(identical(other.selectedLayerId, selectedLayerId) || other.selectedLayerId == selectedLayerId)&&(identical(other.isLiquidGlassMode, isLiquidGlassMode) || other.isLiquidGlassMode == isLiquidGlassMode)&&const DeepCollectionEquality().equals(other._annotationLayers, _annotationLayers));
}
@override
int get hashCode => Object.hash(runtimeType,aspectRatio,showGrid,gridSize,background,const DeepCollectionEquality().hash(_textLayers),const DeepCollectionEquality().hash(_stickerLayers),const DeepCollectionEquality().hash(_glassCardLayers),watermarkStyle,watermarkText,selectedLayerId,isLiquidGlassMode,const DeepCollectionEquality().hash(_annotationLayers));
@override
String toString() {
return 'QuoteCanvasModel(aspectRatio: $aspectRatio, showGrid: $showGrid, gridSize: $gridSize, background: $background, textLayers: $textLayers, stickerLayers: $stickerLayers, glassCardLayers: $glassCardLayers, watermarkStyle: $watermarkStyle, watermarkText: $watermarkText, selectedLayerId: $selectedLayerId, isLiquidGlassMode: $isLiquidGlassMode, annotationLayers: $annotationLayers)';
}
}
/// @nodoc
abstract mixin class _$QuoteCanvasModelCopyWith<$Res> implements $QuoteCanvasModelCopyWith<$Res> {
factory _$QuoteCanvasModelCopyWith(_QuoteCanvasModel value, $Res Function(_QuoteCanvasModel) _then) = __$QuoteCanvasModelCopyWithImpl;
@override @useResult
$Res call({
CanvasAspectRatio aspectRatio, bool showGrid, double gridSize, BackgroundLayer background, List<TextLayer> textLayers, List<StickerLayer> stickerLayers, List<GlassCardLayer> glassCardLayers, WatermarkStyle watermarkStyle, String? watermarkText, String? selectedLayerId, bool isLiquidGlassMode, List<AnnotationLayer> annotationLayers
});
@override $BackgroundLayerCopyWith<$Res> get background;
}
/// @nodoc
class __$QuoteCanvasModelCopyWithImpl<$Res>
implements _$QuoteCanvasModelCopyWith<$Res> {
__$QuoteCanvasModelCopyWithImpl(this._self, this._then);
final _QuoteCanvasModel _self;
final $Res Function(_QuoteCanvasModel) _then;
/// Create a copy of QuoteCanvasModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? aspectRatio = null,Object? showGrid = null,Object? gridSize = null,Object? background = null,Object? textLayers = null,Object? stickerLayers = null,Object? glassCardLayers = null,Object? watermarkStyle = null,Object? watermarkText = freezed,Object? selectedLayerId = freezed,Object? isLiquidGlassMode = null,Object? annotationLayers = null,}) {
return _then(_QuoteCanvasModel(
aspectRatio: null == aspectRatio ? _self.aspectRatio : aspectRatio // ignore: cast_nullable_to_non_nullable
as CanvasAspectRatio,showGrid: null == showGrid ? _self.showGrid : showGrid // ignore: cast_nullable_to_non_nullable
as bool,gridSize: null == gridSize ? _self.gridSize : gridSize // ignore: cast_nullable_to_non_nullable
as double,background: null == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
as BackgroundLayer,textLayers: null == textLayers ? _self._textLayers : textLayers // ignore: cast_nullable_to_non_nullable
as List<TextLayer>,stickerLayers: null == stickerLayers ? _self._stickerLayers : stickerLayers // ignore: cast_nullable_to_non_nullable
as List<StickerLayer>,glassCardLayers: null == glassCardLayers ? _self._glassCardLayers : glassCardLayers // ignore: cast_nullable_to_non_nullable
as List<GlassCardLayer>,watermarkStyle: null == watermarkStyle ? _self.watermarkStyle : watermarkStyle // ignore: cast_nullable_to_non_nullable
as WatermarkStyle,watermarkText: freezed == watermarkText ? _self.watermarkText : watermarkText // ignore: cast_nullable_to_non_nullable
as String?,selectedLayerId: freezed == selectedLayerId ? _self.selectedLayerId : selectedLayerId // ignore: cast_nullable_to_non_nullable
as String?,isLiquidGlassMode: null == isLiquidGlassMode ? _self.isLiquidGlassMode : isLiquidGlassMode // ignore: cast_nullable_to_non_nullable
as bool,annotationLayers: null == annotationLayers ? _self._annotationLayers : annotationLayers // ignore: cast_nullable_to_non_nullable
as List<AnnotationLayer>,
));
}
/// Create a copy of QuoteCanvasModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$BackgroundLayerCopyWith<$Res> get background {
return $BackgroundLayerCopyWith<$Res>(_self.background, (value) {
return _then(_self.copyWith(background: value));
});
}
}
// dart format on