Приложение на флаторе, настройки
This commit is contained in:
@@ -0,0 +1,692 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'settings_state.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SettingsState {
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() initial,
|
||||
required TResult Function() loading,
|
||||
required TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)
|
||||
loaded,
|
||||
required TResult Function(String message) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? initial,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult? Function(String message)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? initial,
|
||||
TResult Function()? loading,
|
||||
TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult Function(String message)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(SettingsInitial value) initial,
|
||||
required TResult Function(SettingsLoading value) loading,
|
||||
required TResult Function(SettingsLoaded value) loaded,
|
||||
required TResult Function(SettingsError value) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(SettingsInitial value)? initial,
|
||||
TResult? Function(SettingsLoading value)? loading,
|
||||
TResult? Function(SettingsLoaded value)? loaded,
|
||||
TResult? Function(SettingsError value)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(SettingsInitial value)? initial,
|
||||
TResult Function(SettingsLoading value)? loading,
|
||||
TResult Function(SettingsLoaded value)? loaded,
|
||||
TResult Function(SettingsError value)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SettingsStateCopyWith<$Res> {
|
||||
factory $SettingsStateCopyWith(
|
||||
SettingsState value, $Res Function(SettingsState) then) =
|
||||
_$SettingsStateCopyWithImpl<$Res, SettingsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SettingsStateCopyWithImpl<$Res, $Val extends SettingsState>
|
||||
implements $SettingsStateCopyWith<$Res> {
|
||||
_$SettingsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsInitialImplCopyWith<$Res> {
|
||||
factory _$$SettingsInitialImplCopyWith(_$SettingsInitialImpl value,
|
||||
$Res Function(_$SettingsInitialImpl) then) =
|
||||
__$$SettingsInitialImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SettingsInitialImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsInitialImpl>
|
||||
implements _$$SettingsInitialImplCopyWith<$Res> {
|
||||
__$$SettingsInitialImplCopyWithImpl(
|
||||
_$SettingsInitialImpl _value, $Res Function(_$SettingsInitialImpl) _then)
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$SettingsInitialImpl implements SettingsInitial {
|
||||
const _$SettingsInitialImpl();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SettingsState.initial()';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$SettingsInitialImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() initial,
|
||||
required TResult Function() loading,
|
||||
required TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)
|
||||
loaded,
|
||||
required TResult Function(String message) error,
|
||||
}) {
|
||||
return initial();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? initial,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult? Function(String message)? error,
|
||||
}) {
|
||||
return initial?.call();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? initial,
|
||||
TResult Function()? loading,
|
||||
TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult Function(String message)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (initial != null) {
|
||||
return initial();
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(SettingsInitial value) initial,
|
||||
required TResult Function(SettingsLoading value) loading,
|
||||
required TResult Function(SettingsLoaded value) loaded,
|
||||
required TResult Function(SettingsError value) error,
|
||||
}) {
|
||||
return initial(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(SettingsInitial value)? initial,
|
||||
TResult? Function(SettingsLoading value)? loading,
|
||||
TResult? Function(SettingsLoaded value)? loaded,
|
||||
TResult? Function(SettingsError value)? error,
|
||||
}) {
|
||||
return initial?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(SettingsInitial value)? initial,
|
||||
TResult Function(SettingsLoading value)? loading,
|
||||
TResult Function(SettingsLoaded value)? loaded,
|
||||
TResult Function(SettingsError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (initial != null) {
|
||||
return initial(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class SettingsInitial implements SettingsState {
|
||||
const factory SettingsInitial() = _$SettingsInitialImpl;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsLoadingImplCopyWith<$Res> {
|
||||
factory _$$SettingsLoadingImplCopyWith(_$SettingsLoadingImpl value,
|
||||
$Res Function(_$SettingsLoadingImpl) then) =
|
||||
__$$SettingsLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SettingsLoadingImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsLoadingImpl>
|
||||
implements _$$SettingsLoadingImplCopyWith<$Res> {
|
||||
__$$SettingsLoadingImplCopyWithImpl(
|
||||
_$SettingsLoadingImpl _value, $Res Function(_$SettingsLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$SettingsLoadingImpl implements SettingsLoading {
|
||||
const _$SettingsLoadingImpl();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SettingsState.loading()';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$SettingsLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() initial,
|
||||
required TResult Function() loading,
|
||||
required TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)
|
||||
loaded,
|
||||
required TResult Function(String message) error,
|
||||
}) {
|
||||
return loading();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? initial,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult? Function(String message)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? initial,
|
||||
TResult Function()? loading,
|
||||
TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult Function(String message)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loading != null) {
|
||||
return loading();
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(SettingsInitial value) initial,
|
||||
required TResult Function(SettingsLoading value) loading,
|
||||
required TResult Function(SettingsLoaded value) loaded,
|
||||
required TResult Function(SettingsError value) error,
|
||||
}) {
|
||||
return loading(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(SettingsInitial value)? initial,
|
||||
TResult? Function(SettingsLoading value)? loading,
|
||||
TResult? Function(SettingsLoaded value)? loaded,
|
||||
TResult? Function(SettingsError value)? error,
|
||||
}) {
|
||||
return loading?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(SettingsInitial value)? initial,
|
||||
TResult Function(SettingsLoading value)? loading,
|
||||
TResult Function(SettingsLoaded value)? loaded,
|
||||
TResult Function(SettingsError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loading != null) {
|
||||
return loading(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class SettingsLoading implements SettingsState {
|
||||
const factory SettingsLoading() = _$SettingsLoadingImpl;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsLoadedImplCopyWith<$Res> {
|
||||
factory _$$SettingsLoadedImplCopyWith(_$SettingsLoadedImpl value,
|
||||
$Res Function(_$SettingsLoadedImpl) then) =
|
||||
__$$SettingsLoadedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String apiUrl,
|
||||
ServerConfig? serverConfig,
|
||||
String languageCode,
|
||||
String? error});
|
||||
|
||||
$ServerConfigCopyWith<$Res>? get serverConfig;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SettingsLoadedImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsLoadedImpl>
|
||||
implements _$$SettingsLoadedImplCopyWith<$Res> {
|
||||
__$$SettingsLoadedImplCopyWithImpl(
|
||||
_$SettingsLoadedImpl _value, $Res Function(_$SettingsLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? apiUrl = null,
|
||||
Object? serverConfig = freezed,
|
||||
Object? languageCode = null,
|
||||
Object? error = freezed,
|
||||
}) {
|
||||
return _then(_$SettingsLoadedImpl(
|
||||
apiUrl: null == apiUrl
|
||||
? _value.apiUrl
|
||||
: apiUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
serverConfig: freezed == serverConfig
|
||||
? _value.serverConfig
|
||||
: serverConfig // ignore: cast_nullable_to_non_nullable
|
||||
as ServerConfig?,
|
||||
languageCode: null == languageCode
|
||||
? _value.languageCode
|
||||
: languageCode // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
error: freezed == error
|
||||
? _value.error
|
||||
: error // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ServerConfigCopyWith<$Res>? get serverConfig {
|
||||
if (_value.serverConfig == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ServerConfigCopyWith<$Res>(_value.serverConfig!, (value) {
|
||||
return _then(_value.copyWith(serverConfig: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$SettingsLoadedImpl implements SettingsLoaded {
|
||||
const _$SettingsLoadedImpl(
|
||||
{required this.apiUrl,
|
||||
required this.serverConfig,
|
||||
required this.languageCode,
|
||||
this.error});
|
||||
|
||||
@override
|
||||
final String apiUrl;
|
||||
@override
|
||||
final ServerConfig? serverConfig;
|
||||
@override
|
||||
final String languageCode;
|
||||
@override
|
||||
final String? error;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SettingsState.loaded(apiUrl: $apiUrl, serverConfig: $serverConfig, languageCode: $languageCode, error: $error)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SettingsLoadedImpl &&
|
||||
(identical(other.apiUrl, apiUrl) || other.apiUrl == apiUrl) &&
|
||||
(identical(other.serverConfig, serverConfig) ||
|
||||
other.serverConfig == serverConfig) &&
|
||||
(identical(other.languageCode, languageCode) ||
|
||||
other.languageCode == languageCode) &&
|
||||
(identical(other.error, error) || other.error == error));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, apiUrl, serverConfig, languageCode, error);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SettingsLoadedImplCopyWith<_$SettingsLoadedImpl> get copyWith =>
|
||||
__$$SettingsLoadedImplCopyWithImpl<_$SettingsLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() initial,
|
||||
required TResult Function() loading,
|
||||
required TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)
|
||||
loaded,
|
||||
required TResult Function(String message) error,
|
||||
}) {
|
||||
return loaded(apiUrl, serverConfig, languageCode, this.error);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? initial,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult? Function(String message)? error,
|
||||
}) {
|
||||
return loaded?.call(apiUrl, serverConfig, languageCode, this.error);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? initial,
|
||||
TResult Function()? loading,
|
||||
TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult Function(String message)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loaded != null) {
|
||||
return loaded(apiUrl, serverConfig, languageCode, this.error);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(SettingsInitial value) initial,
|
||||
required TResult Function(SettingsLoading value) loading,
|
||||
required TResult Function(SettingsLoaded value) loaded,
|
||||
required TResult Function(SettingsError value) error,
|
||||
}) {
|
||||
return loaded(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(SettingsInitial value)? initial,
|
||||
TResult? Function(SettingsLoading value)? loading,
|
||||
TResult? Function(SettingsLoaded value)? loaded,
|
||||
TResult? Function(SettingsError value)? error,
|
||||
}) {
|
||||
return loaded?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(SettingsInitial value)? initial,
|
||||
TResult Function(SettingsLoading value)? loading,
|
||||
TResult Function(SettingsLoaded value)? loaded,
|
||||
TResult Function(SettingsError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loaded != null) {
|
||||
return loaded(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class SettingsLoaded implements SettingsState {
|
||||
const factory SettingsLoaded(
|
||||
{required final String apiUrl,
|
||||
required final ServerConfig? serverConfig,
|
||||
required final String languageCode,
|
||||
final String? error}) = _$SettingsLoadedImpl;
|
||||
|
||||
String get apiUrl;
|
||||
ServerConfig? get serverConfig;
|
||||
String get languageCode;
|
||||
String? get error;
|
||||
@JsonKey(ignore: true)
|
||||
_$$SettingsLoadedImplCopyWith<_$SettingsLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsErrorImplCopyWith<$Res> {
|
||||
factory _$$SettingsErrorImplCopyWith(
|
||||
_$SettingsErrorImpl value, $Res Function(_$SettingsErrorImpl) then) =
|
||||
__$$SettingsErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String message});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SettingsErrorImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsErrorImpl>
|
||||
implements _$$SettingsErrorImplCopyWith<$Res> {
|
||||
__$$SettingsErrorImplCopyWithImpl(
|
||||
_$SettingsErrorImpl _value, $Res Function(_$SettingsErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? message = null,
|
||||
}) {
|
||||
return _then(_$SettingsErrorImpl(
|
||||
null == message
|
||||
? _value.message
|
||||
: message // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$SettingsErrorImpl implements SettingsError {
|
||||
const _$SettingsErrorImpl(this.message);
|
||||
|
||||
@override
|
||||
final String message;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SettingsState.error(message: $message)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SettingsErrorImpl &&
|
||||
(identical(other.message, message) || other.message == message));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, message);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SettingsErrorImplCopyWith<_$SettingsErrorImpl> get copyWith =>
|
||||
__$$SettingsErrorImplCopyWithImpl<_$SettingsErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() initial,
|
||||
required TResult Function() loading,
|
||||
required TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)
|
||||
loaded,
|
||||
required TResult Function(String message) error,
|
||||
}) {
|
||||
return error(message);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? initial,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult? Function(String message)? error,
|
||||
}) {
|
||||
return error?.call(message);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? initial,
|
||||
TResult Function()? loading,
|
||||
TResult Function(String apiUrl, ServerConfig? serverConfig,
|
||||
String languageCode, String? error)?
|
||||
loaded,
|
||||
TResult Function(String message)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (error != null) {
|
||||
return error(message);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(SettingsInitial value) initial,
|
||||
required TResult Function(SettingsLoading value) loading,
|
||||
required TResult Function(SettingsLoaded value) loaded,
|
||||
required TResult Function(SettingsError value) error,
|
||||
}) {
|
||||
return error(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(SettingsInitial value)? initial,
|
||||
TResult? Function(SettingsLoading value)? loading,
|
||||
TResult? Function(SettingsLoaded value)? loaded,
|
||||
TResult? Function(SettingsError value)? error,
|
||||
}) {
|
||||
return error?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(SettingsInitial value)? initial,
|
||||
TResult Function(SettingsLoading value)? loading,
|
||||
TResult Function(SettingsLoaded value)? loaded,
|
||||
TResult Function(SettingsError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (error != null) {
|
||||
return error(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class SettingsError implements SettingsState {
|
||||
const factory SettingsError(final String message) = _$SettingsErrorImpl;
|
||||
|
||||
String get message;
|
||||
@JsonKey(ignore: true)
|
||||
_$$SettingsErrorImplCopyWith<_$SettingsErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
Reference in New Issue
Block a user