Files
cutdex/lib/features/settings/location_settings.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

451 lines
12 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 'location_settings.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$LocationSettingsState {
String? get directory;
ProjectLocationStatus? get status;
bool get loading;
bool get saving;
LocationSettingsError? get error;
/// Create a copy of LocationSettingsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LocationSettingsStateCopyWith<LocationSettingsState> get copyWith =>
_$LocationSettingsStateCopyWithImpl<LocationSettingsState>(
this as LocationSettingsState,
_$identity,
);
@override
bool operator ==(Object other) {
final _this = this as LocationSettingsState;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is LocationSettingsState &&
(identical(other.directory, _this.directory) ||
other.directory == _this.directory) &&
(identical(other.status, _this.status) ||
other.status == _this.status) &&
(identical(other.loading, _this.loading) ||
other.loading == _this.loading) &&
(identical(other.saving, _this.saving) ||
other.saving == _this.saving) &&
(identical(other.error, _this.error) ||
other.error == _this.error));
}
@override
int get hashCode {
final _this = this as LocationSettingsState;
return Object.hash(
runtimeType,
_this.directory,
_this.status,
_this.loading,
_this.saving,
_this.error,
);
}
@override
String toString() {
final _this = this as LocationSettingsState;
return 'LocationSettingsState(directory: ${_this.directory}, status: ${_this.status}, loading: ${_this.loading}, saving: ${_this.saving}, error: ${_this.error})';
}
}
/// @nodoc
abstract mixin class $LocationSettingsStateCopyWith<$Res> {
factory $LocationSettingsStateCopyWith(
LocationSettingsState value,
$Res Function(LocationSettingsState) _then,
) = _$LocationSettingsStateCopyWithImpl;
@useResult
$Res call({
String? directory,
ProjectLocationStatus? status,
bool loading,
bool saving,
LocationSettingsError? error,
});
}
/// @nodoc
class _$LocationSettingsStateCopyWithImpl<$Res>
implements $LocationSettingsStateCopyWith<$Res> {
_$LocationSettingsStateCopyWithImpl(this._self, this._then);
final LocationSettingsState _self;
final $Res Function(LocationSettingsState) _then;
/// Create a copy of LocationSettingsState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? directory = freezed,
Object? status = freezed,
Object? loading = null,
Object? saving = null,
Object? error = freezed,
}) {
return _then(
LocationSettingsState(
directory: freezed == directory
? _self.directory
: directory // ignore: cast_nullable_to_non_nullable
as String?,
status: freezed == status
? _self.status
: status // ignore: cast_nullable_to_non_nullable
as ProjectLocationStatus?,
loading: null == loading
? _self.loading
: loading // ignore: cast_nullable_to_non_nullable
as bool,
saving: null == saving
? _self.saving
: saving // ignore: cast_nullable_to_non_nullable
as bool,
error: freezed == error
? _self.error
: error // ignore: cast_nullable_to_non_nullable
as LocationSettingsError?,
),
);
}
}
/// Adds pattern-matching-related methods to [LocationSettingsState].
extension LocationSettingsStatePatterns on LocationSettingsState {
/// 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(_LocationSettingsState value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _LocationSettingsState() 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(_LocationSettingsState value) $default,
) {
final _that = this;
switch (_that) {
case _LocationSettingsState():
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(_LocationSettingsState value)? $default,
) {
final _that = this;
switch (_that) {
case _LocationSettingsState() 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? directory,
ProjectLocationStatus? status,
bool loading,
bool saving,
LocationSettingsError? error,
)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _LocationSettingsState() when $default != null:
return $default(
_that.directory,
_that.status,
_that.loading,
_that.saving,
_that.error,
);
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? directory,
ProjectLocationStatus? status,
bool loading,
bool saving,
LocationSettingsError? error,
)
$default,
) {
final _that = this;
switch (_that) {
case _LocationSettingsState():
return $default(
_that.directory,
_that.status,
_that.loading,
_that.saving,
_that.error,
);
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(
String? directory,
ProjectLocationStatus? status,
bool loading,
bool saving,
LocationSettingsError? error,
)?
$default,
) {
final _that = this;
switch (_that) {
case _LocationSettingsState() when $default != null:
return $default(
_that.directory,
_that.status,
_that.loading,
_that.saving,
_that.error,
);
case _:
return null;
}
}
}
/// @nodoc
class _LocationSettingsState implements LocationSettingsState {
const _LocationSettingsState({
this.directory,
this.status,
this.loading = true,
this.saving = false,
this.error,
});
@override
final String? directory;
@override
final ProjectLocationStatus? status;
@override
@JsonKey()
final bool loading;
@override
@JsonKey()
final bool saving;
@override
final LocationSettingsError? error;
/// Create a copy of LocationSettingsState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LocationSettingsStateCopyWith<_LocationSettingsState> get copyWith =>
__$LocationSettingsStateCopyWithImpl<_LocationSettingsState>(
this,
_$identity,
);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _LocationSettingsState &&
(identical(other.directory, directory) ||
other.directory == directory) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.loading, loading) || other.loading == loading) &&
(identical(other.saving, saving) || other.saving == saving) &&
(identical(other.error, error) || other.error == error));
}
@override
int get hashCode {
return Object.hash(runtimeType, directory, status, loading, saving, error);
}
@override
String toString() {
return 'LocationSettingsState(directory: $directory, status: $status, loading: $loading, saving: $saving, error: $error)';
}
}
/// @nodoc
abstract mixin class _$LocationSettingsStateCopyWith<$Res>
implements $LocationSettingsStateCopyWith<$Res> {
factory _$LocationSettingsStateCopyWith(
_LocationSettingsState value,
$Res Function(_LocationSettingsState) _then,
) = __$LocationSettingsStateCopyWithImpl;
@override
@useResult
$Res call({
String? directory,
ProjectLocationStatus? status,
bool loading,
bool saving,
LocationSettingsError? error,
});
}
/// @nodoc
class __$LocationSettingsStateCopyWithImpl<$Res>
implements _$LocationSettingsStateCopyWith<$Res> {
__$LocationSettingsStateCopyWithImpl(this._self, this._then);
final _LocationSettingsState _self;
final $Res Function(_LocationSettingsState) _then;
/// Create a copy of LocationSettingsState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? directory = freezed,
Object? status = freezed,
Object? loading = null,
Object? saving = null,
Object? error = freezed,
}) {
return _then(
_LocationSettingsState(
directory: freezed == directory
? _self.directory
: directory // ignore: cast_nullable_to_non_nullable
as String?,
status: freezed == status
? _self.status
: status // ignore: cast_nullable_to_non_nullable
as ProjectLocationStatus?,
loading: null == loading
? _self.loading
: loading // ignore: cast_nullable_to_non_nullable
as bool,
saving: null == saving
? _self.saving
: saving // ignore: cast_nullable_to_non_nullable
as bool,
error: freezed == error
? _self.error
: error // ignore: cast_nullable_to_non_nullable
as LocationSettingsError?,
),
);
}
}