Files
cutdex/lib/settings/mcp_settings_value.freezed.dart
lingjhf 27e77fff39 feat: initial Cutdex application
Add the Flutter video editing application with project management, media
import, timeline editing, preview, AI assistance, diagnostics and settings.

Include shared UI and native host packages, platform runners, application
tests and release tooling.

Provide usage and contribution guides, the MIT license and third-party
notices. Exclude local credentials, build outputs and validation data.
2026-10-05 23:36:23 +08:00

341 lines
9.3 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
// 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 'mcp_settings_value.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$McpSettingsValue {
bool get enabled;
int get port;
String get token;
/// Create a copy of McpSettingsValue
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$McpSettingsValueCopyWith<McpSettingsValue> get copyWith =>
_$McpSettingsValueCopyWithImpl<McpSettingsValue>(
this as McpSettingsValue,
_$identity,
);
@override
bool operator ==(Object other) {
final _this = this as McpSettingsValue;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is McpSettingsValue &&
(identical(other.enabled, _this.enabled) ||
other.enabled == _this.enabled) &&
(identical(other.port, _this.port) || other.port == _this.port) &&
(identical(other.token, _this.token) ||
other.token == _this.token));
}
@override
int get hashCode {
final _this = this as McpSettingsValue;
return Object.hash(runtimeType, _this.enabled, _this.port, _this.token);
}
}
/// @nodoc
abstract mixin class $McpSettingsValueCopyWith<$Res> {
factory $McpSettingsValueCopyWith(
McpSettingsValue value,
$Res Function(McpSettingsValue) _then,
) = _$McpSettingsValueCopyWithImpl;
@useResult
$Res call({bool enabled, int port, String token});
}
/// @nodoc
class _$McpSettingsValueCopyWithImpl<$Res>
implements $McpSettingsValueCopyWith<$Res> {
_$McpSettingsValueCopyWithImpl(this._self, this._then);
final McpSettingsValue _self;
final $Res Function(McpSettingsValue) _then;
/// Create a copy of McpSettingsValue
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? enabled = null,
Object? port = null,
Object? token = null,
}) {
return _then(
McpSettingsValue(
enabled: null == enabled
? _self.enabled
: enabled // ignore: cast_nullable_to_non_nullable
as bool,
port: null == port
? _self.port
: port // ignore: cast_nullable_to_non_nullable
as int,
token: null == token
? _self.token
: token // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// Adds pattern-matching-related methods to [McpSettingsValue].
extension McpSettingsValuePatterns on McpSettingsValue {
/// 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(_McpSettingsValue value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _McpSettingsValue() 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(_McpSettingsValue value) $default,
) {
final _that = this;
switch (_that) {
case _McpSettingsValue():
return $default(_that);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(_McpSettingsValue value)? $default,
) {
final _that = this;
switch (_that) {
case _McpSettingsValue() 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(bool enabled, int port, String token)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _McpSettingsValue() when $default != null:
return $default(_that.enabled, _that.port, _that.token);
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(bool enabled, int port, String token) $default,
) {
final _that = this;
switch (_that) {
case _McpSettingsValue():
return $default(_that.enabled, _that.port, _that.token);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(bool enabled, int port, String token)? $default,
) {
final _that = this;
switch (_that) {
case _McpSettingsValue() when $default != null:
return $default(_that.enabled, _that.port, _that.token);
case _:
return null;
}
}
}
/// @nodoc
class _McpSettingsValue extends McpSettingsValue {
const _McpSettingsValue({
required this.enabled,
required this.port,
required this.token,
}) : super._();
@override
final bool enabled;
@override
final int port;
@override
final String token;
/// Create a copy of McpSettingsValue
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$McpSettingsValueCopyWith<_McpSettingsValue> get copyWith =>
__$McpSettingsValueCopyWithImpl<_McpSettingsValue>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _McpSettingsValue &&
(identical(other.enabled, enabled) || other.enabled == enabled) &&
(identical(other.port, port) || other.port == port) &&
(identical(other.token, token) || other.token == token));
}
@override
int get hashCode {
return Object.hash(runtimeType, enabled, port, token);
}
}
/// @nodoc
abstract mixin class _$McpSettingsValueCopyWith<$Res>
implements $McpSettingsValueCopyWith<$Res> {
factory _$McpSettingsValueCopyWith(
_McpSettingsValue value,
$Res Function(_McpSettingsValue) _then,
) = __$McpSettingsValueCopyWithImpl;
@override
@useResult
$Res call({bool enabled, int port, String token});
}
/// @nodoc
class __$McpSettingsValueCopyWithImpl<$Res>
implements _$McpSettingsValueCopyWith<$Res> {
__$McpSettingsValueCopyWithImpl(this._self, this._then);
final _McpSettingsValue _self;
final $Res Function(_McpSettingsValue) _then;
/// Create a copy of McpSettingsValue
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? enabled = null,
Object? port = null,
Object? token = null,
}) {
return _then(
_McpSettingsValue(
enabled: null == enabled
? _self.enabled
: enabled // ignore: cast_nullable_to_non_nullable
as bool,
port: null == port
? _self.port
: port // ignore: cast_nullable_to_non_nullable
as int,
token: null == token
? _self.token
: token // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}