forked from eatvio/eatvio_app
fix: remove ignored files
This commit is contained in:
@@ -1,803 +0,0 @@
|
||||
// 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 'chat_room_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 _$ChatRoomState {
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value) $default, {
|
||||
required TResult Function(ChatRoomStateLoading value) loading,
|
||||
required TResult Function(ChatRoomStateLoaded value) loaded,
|
||||
required TResult Function(ChatRoomStateError value) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ChatRoomState value)? $default, {
|
||||
TResult? Function(ChatRoomStateLoading value)? loading,
|
||||
TResult? Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult? Function(ChatRoomStateError value)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value)? $default, {
|
||||
TResult Function(ChatRoomStateLoading value)? loading,
|
||||
TResult Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult Function(ChatRoomStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomStateCopyWith<$Res> {
|
||||
factory $ChatRoomStateCopyWith(
|
||||
ChatRoomState value, $Res Function(ChatRoomState) then) =
|
||||
_$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
|
||||
implements $ChatRoomStateCopyWith<$Res> {
|
||||
_$ChatRoomStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateImplCopyWith(
|
||||
_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) =
|
||||
__$$ChatRoomStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl>
|
||||
implements _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateImplCopyWithImpl(
|
||||
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
const _$ChatRoomStateImpl();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatRoomState()';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if ($default != null) {
|
||||
return $default();
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value) $default, {
|
||||
required TResult Function(ChatRoomStateLoading value) loading,
|
||||
required TResult Function(ChatRoomStateLoaded value) loaded,
|
||||
required TResult Function(ChatRoomStateError value) error,
|
||||
}) {
|
||||
return $default(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ChatRoomState value)? $default, {
|
||||
TResult? Function(ChatRoomStateLoading value)? loading,
|
||||
TResult? Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult? Function(ChatRoomStateError value)? error,
|
||||
}) {
|
||||
return $default?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value)? $default, {
|
||||
TResult Function(ChatRoomStateLoading value)? loading,
|
||||
TResult Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult Function(ChatRoomStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if ($default != null) {
|
||||
return $default(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _ChatRoomState implements ChatRoomState {
|
||||
const factory _ChatRoomState() = _$ChatRoomStateImpl;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) then) =
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
|
||||
implements _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
const _$ChatRoomStateLoadingImpl();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatRoomState.loading()';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loading != null) {
|
||||
return loading();
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value) $default, {
|
||||
required TResult Function(ChatRoomStateLoading value) loading,
|
||||
required TResult Function(ChatRoomStateLoaded value) loaded,
|
||||
required TResult Function(ChatRoomStateError value) error,
|
||||
}) {
|
||||
return loading(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ChatRoomState value)? $default, {
|
||||
TResult? Function(ChatRoomStateLoading value)? loading,
|
||||
TResult? Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult? Function(ChatRoomStateError value)? error,
|
||||
}) {
|
||||
return loading?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value)? $default, {
|
||||
TResult Function(ChatRoomStateLoading value)? loading,
|
||||
TResult Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult Function(ChatRoomStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loading != null) {
|
||||
return loading(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class ChatRoomStateLoading implements ChatRoomState {
|
||||
const factory ChatRoomStateLoading() = _$ChatRoomStateLoadingImpl;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) then) =
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading});
|
||||
|
||||
$ChatRoomModelCopyWith<$Res> get chatRoom;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
|
||||
implements _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? chatRoom = null,
|
||||
Object? chatMessages = null,
|
||||
Object? hasCard = null,
|
||||
Object? isTyping = null,
|
||||
Object? isLoading = null,
|
||||
}) {
|
||||
return _then(_$ChatRoomStateLoadedImpl(
|
||||
chatRoom: null == chatRoom
|
||||
? _value.chatRoom
|
||||
: chatRoom // ignore: cast_nullable_to_non_nullable
|
||||
as ChatRoomModel,
|
||||
chatMessages: null == chatMessages
|
||||
? _value._chatMessages
|
||||
: chatMessages // ignore: cast_nullable_to_non_nullable
|
||||
as List<ChatMessageModel>,
|
||||
hasCard: null == hasCard
|
||||
? _value.hasCard
|
||||
: hasCard // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isTyping: null == isTyping
|
||||
? _value.isTyping
|
||||
: isTyping // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChatRoomModelCopyWith<$Res> get chatRoom {
|
||||
return $ChatRoomModelCopyWith<$Res>(_value.chatRoom, (value) {
|
||||
return _then(_value.copyWith(chatRoom: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
const _$ChatRoomStateLoadedImpl(
|
||||
{required this.chatRoom,
|
||||
required final List<ChatMessageModel> chatMessages,
|
||||
required this.hasCard,
|
||||
required this.isTyping,
|
||||
required this.isLoading})
|
||||
: _chatMessages = chatMessages;
|
||||
|
||||
@override
|
||||
final ChatRoomModel chatRoom;
|
||||
final List<ChatMessageModel> _chatMessages;
|
||||
@override
|
||||
List<ChatMessageModel> get chatMessages {
|
||||
if (_chatMessages is EqualUnmodifiableListView) return _chatMessages;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_chatMessages);
|
||||
}
|
||||
|
||||
@override
|
||||
final bool hasCard;
|
||||
@override
|
||||
final bool isTyping;
|
||||
@override
|
||||
final bool isLoading;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatRoomState.loaded(chatRoom: $chatRoom, chatMessages: $chatMessages, hasCard: $hasCard, isTyping: $isTyping, isLoading: $isLoading)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadedImpl &&
|
||||
(identical(other.chatRoom, chatRoom) ||
|
||||
other.chatRoom == chatRoom) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chatMessages, _chatMessages) &&
|
||||
(identical(other.hasCard, hasCard) || other.hasCard == hasCard) &&
|
||||
(identical(other.isTyping, isTyping) ||
|
||||
other.isTyping == isTyping) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
chatRoom,
|
||||
const DeepCollectionEquality().hash(_chatMessages),
|
||||
hasCard,
|
||||
isTyping,
|
||||
isLoading);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(chatRoom, chatMessages, hasCard, isTyping, isLoading);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(chatRoom, chatMessages, hasCard, isTyping, isLoading);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loaded != null) {
|
||||
return loaded(chatRoom, chatMessages, hasCard, isTyping, isLoading);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value) $default, {
|
||||
required TResult Function(ChatRoomStateLoading value) loading,
|
||||
required TResult Function(ChatRoomStateLoaded value) loaded,
|
||||
required TResult Function(ChatRoomStateError value) error,
|
||||
}) {
|
||||
return loaded(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ChatRoomState value)? $default, {
|
||||
TResult? Function(ChatRoomStateLoading value)? loading,
|
||||
TResult? Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult? Function(ChatRoomStateError value)? error,
|
||||
}) {
|
||||
return loaded?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value)? $default, {
|
||||
TResult Function(ChatRoomStateLoading value)? loading,
|
||||
TResult Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult Function(ChatRoomStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loaded != null) {
|
||||
return loaded(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class ChatRoomStateLoaded implements ChatRoomState {
|
||||
const factory ChatRoomStateLoaded(
|
||||
{required final ChatRoomModel chatRoom,
|
||||
required final List<ChatMessageModel> chatMessages,
|
||||
required final bool hasCard,
|
||||
required final bool isTyping,
|
||||
required final bool isLoading}) = _$ChatRoomStateLoadedImpl;
|
||||
|
||||
ChatRoomModel get chatRoom;
|
||||
List<ChatMessageModel> get chatMessages;
|
||||
bool get hasCard;
|
||||
bool get isTyping;
|
||||
bool get isLoading;
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) then) =
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
|
||||
implements _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? errorMessage = null,
|
||||
}) {
|
||||
return _then(_$ChatRoomStateErrorImpl(
|
||||
errorMessage: null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
const _$ChatRoomStateErrorImpl({required this.errorMessage});
|
||||
|
||||
@override
|
||||
final String errorMessage;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatRoomState.error(errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool hasCard,
|
||||
bool isTyping,
|
||||
bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (error != null) {
|
||||
return error(errorMessage);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value) $default, {
|
||||
required TResult Function(ChatRoomStateLoading value) loading,
|
||||
required TResult Function(ChatRoomStateLoaded value) loaded,
|
||||
required TResult Function(ChatRoomStateError value) error,
|
||||
}) {
|
||||
return error(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ChatRoomState value)? $default, {
|
||||
TResult? Function(ChatRoomStateLoading value)? loading,
|
||||
TResult? Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult? Function(ChatRoomStateError value)? error,
|
||||
}) {
|
||||
return error?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ChatRoomState value)? $default, {
|
||||
TResult Function(ChatRoomStateLoading value)? loading,
|
||||
TResult Function(ChatRoomStateLoaded value)? loaded,
|
||||
TResult Function(ChatRoomStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (error != null) {
|
||||
return error(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class ChatRoomStateError implements ChatRoomState {
|
||||
const factory ChatRoomStateError({required final String errorMessage}) =
|
||||
_$ChatRoomStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
// 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 'chats_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 _$ChatsState {
|
||||
BaseState get state => throw _privateConstructorUsedError;
|
||||
int get chatsWithUnreadMessagesCount => throw _privateConstructorUsedError;
|
||||
List<ChatRoom> get chatRooms => throw _privateConstructorUsedError;
|
||||
bool get isLoadingMoreChats => throw _privateConstructorUsedError;
|
||||
String? get errorMessage => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of ChatsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatsStateCopyWith<ChatsState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatsStateCopyWith<$Res> {
|
||||
factory $ChatsStateCopyWith(
|
||||
ChatsState value, $Res Function(ChatsState) then) =
|
||||
_$ChatsStateCopyWithImpl<$Res, ChatsState>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{BaseState state,
|
||||
int chatsWithUnreadMessagesCount,
|
||||
List<ChatRoom> chatRooms,
|
||||
bool isLoadingMoreChats,
|
||||
String? errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatsStateCopyWithImpl<$Res, $Val extends ChatsState>
|
||||
implements $ChatsStateCopyWith<$Res> {
|
||||
_$ChatsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ChatsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? state = null,
|
||||
Object? chatsWithUnreadMessagesCount = null,
|
||||
Object? chatRooms = null,
|
||||
Object? isLoadingMoreChats = null,
|
||||
Object? errorMessage = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as BaseState,
|
||||
chatsWithUnreadMessagesCount: null == chatsWithUnreadMessagesCount
|
||||
? _value.chatsWithUnreadMessagesCount
|
||||
: chatsWithUnreadMessagesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
chatRooms: null == chatRooms
|
||||
? _value.chatRooms
|
||||
: chatRooms // ignore: cast_nullable_to_non_nullable
|
||||
as List<ChatRoom>,
|
||||
isLoadingMoreChats: null == isLoadingMoreChats
|
||||
? _value.isLoadingMoreChats
|
||||
: isLoadingMoreChats // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatsStateImplCopyWith<$Res>
|
||||
implements $ChatsStateCopyWith<$Res> {
|
||||
factory _$$ChatsStateImplCopyWith(
|
||||
_$ChatsStateImpl value, $Res Function(_$ChatsStateImpl) then) =
|
||||
__$$ChatsStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{BaseState state,
|
||||
int chatsWithUnreadMessagesCount,
|
||||
List<ChatRoom> chatRooms,
|
||||
bool isLoadingMoreChats,
|
||||
String? errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatsStateImplCopyWithImpl<$Res>
|
||||
extends _$ChatsStateCopyWithImpl<$Res, _$ChatsStateImpl>
|
||||
implements _$$ChatsStateImplCopyWith<$Res> {
|
||||
__$$ChatsStateImplCopyWithImpl(
|
||||
_$ChatsStateImpl _value, $Res Function(_$ChatsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? state = null,
|
||||
Object? chatsWithUnreadMessagesCount = null,
|
||||
Object? chatRooms = null,
|
||||
Object? isLoadingMoreChats = null,
|
||||
Object? errorMessage = freezed,
|
||||
}) {
|
||||
return _then(_$ChatsStateImpl(
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as BaseState,
|
||||
chatsWithUnreadMessagesCount: null == chatsWithUnreadMessagesCount
|
||||
? _value.chatsWithUnreadMessagesCount
|
||||
: chatsWithUnreadMessagesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
chatRooms: null == chatRooms
|
||||
? _value._chatRooms
|
||||
: chatRooms // ignore: cast_nullable_to_non_nullable
|
||||
as List<ChatRoom>,
|
||||
isLoadingMoreChats: null == isLoadingMoreChats
|
||||
? _value.isLoadingMoreChats
|
||||
: isLoadingMoreChats // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatsStateImpl implements _ChatsState {
|
||||
_$ChatsStateImpl(
|
||||
{this.state = BaseState.initial,
|
||||
this.chatsWithUnreadMessagesCount = 0,
|
||||
final List<ChatRoom> chatRooms = const [],
|
||||
this.isLoadingMoreChats = false,
|
||||
this.errorMessage = null})
|
||||
: _chatRooms = chatRooms;
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final BaseState state;
|
||||
@override
|
||||
@JsonKey()
|
||||
final int chatsWithUnreadMessagesCount;
|
||||
final List<ChatRoom> _chatRooms;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<ChatRoom> get chatRooms {
|
||||
if (_chatRooms is EqualUnmodifiableListView) return _chatRooms;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_chatRooms);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool isLoadingMoreChats;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String? errorMessage;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatsState(state: $state, chatsWithUnreadMessagesCount: $chatsWithUnreadMessagesCount, chatRooms: $chatRooms, isLoadingMoreChats: $isLoadingMoreChats, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatsStateImpl &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.chatsWithUnreadMessagesCount,
|
||||
chatsWithUnreadMessagesCount) ||
|
||||
other.chatsWithUnreadMessagesCount ==
|
||||
chatsWithUnreadMessagesCount) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chatRooms, _chatRooms) &&
|
||||
(identical(other.isLoadingMoreChats, isLoadingMoreChats) ||
|
||||
other.isLoadingMoreChats == isLoadingMoreChats) &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
state,
|
||||
chatsWithUnreadMessagesCount,
|
||||
const DeepCollectionEquality().hash(_chatRooms),
|
||||
isLoadingMoreChats,
|
||||
errorMessage);
|
||||
|
||||
/// Create a copy of ChatsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatsStateImplCopyWith<_$ChatsStateImpl> get copyWith =>
|
||||
__$$ChatsStateImplCopyWithImpl<_$ChatsStateImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _ChatsState implements ChatsState {
|
||||
factory _ChatsState(
|
||||
{final BaseState state,
|
||||
final int chatsWithUnreadMessagesCount,
|
||||
final List<ChatRoom> chatRooms,
|
||||
final bool isLoadingMoreChats,
|
||||
final String? errorMessage}) = _$ChatsStateImpl;
|
||||
|
||||
@override
|
||||
BaseState get state;
|
||||
@override
|
||||
int get chatsWithUnreadMessagesCount;
|
||||
@override
|
||||
List<ChatRoom> get chatRooms;
|
||||
@override
|
||||
bool get isLoadingMoreChats;
|
||||
@override
|
||||
String? get errorMessage;
|
||||
|
||||
/// Create a copy of ChatsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatsStateImplCopyWith<_$ChatsStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
Reference in New Issue
Block a user