Files
forkmessager/client-mobile/lib/features/chat/presentation/bloc/chat_event.freezed.dart
T

1759 lines
65 KiB
Dart

// 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_event.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 _$ChatEvent {
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChatEventCopyWith<$Res> {
factory $ChatEventCopyWith(ChatEvent value, $Res Function(ChatEvent) then) =
_$ChatEventCopyWithImpl<$Res, ChatEvent>;
}
/// @nodoc
class _$ChatEventCopyWithImpl<$Res, $Val extends ChatEvent>
implements $ChatEventCopyWith<$Res> {
_$ChatEventCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
}
/// @nodoc
abstract class _$$ChatEventStartedImplCopyWith<$Res> {
factory _$$ChatEventStartedImplCopyWith(_$ChatEventStartedImpl value,
$Res Function(_$ChatEventStartedImpl) then) =
__$$ChatEventStartedImplCopyWithImpl<$Res>;
@useResult
$Res call({String? userId});
}
/// @nodoc
class __$$ChatEventStartedImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventStartedImpl>
implements _$$ChatEventStartedImplCopyWith<$Res> {
__$$ChatEventStartedImplCopyWithImpl(_$ChatEventStartedImpl _value,
$Res Function(_$ChatEventStartedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? userId = freezed,
}) {
return _then(_$ChatEventStartedImpl(
userId: freezed == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
class _$ChatEventStartedImpl implements ChatEventStarted {
const _$ChatEventStartedImpl({this.userId});
@override
final String? userId;
@override
String toString() {
return 'ChatEvent.started(userId: $userId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventStartedImpl &&
(identical(other.userId, userId) || other.userId == userId));
}
@override
int get hashCode => Object.hash(runtimeType, userId);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatEventStartedImplCopyWith<_$ChatEventStartedImpl> get copyWith =>
__$$ChatEventStartedImplCopyWithImpl<_$ChatEventStartedImpl>(
this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return started(userId);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return started?.call(userId);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (started != null) {
return started(userId);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return started(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return started?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (started != null) {
return started(this);
}
return orElse();
}
}
abstract class ChatEventStarted implements ChatEvent {
const factory ChatEventStarted({final String? userId}) =
_$ChatEventStartedImpl;
String? get userId;
@JsonKey(ignore: true)
_$$ChatEventStartedImplCopyWith<_$ChatEventStartedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatEventChatsLoadedImplCopyWith<$Res> {
factory _$$ChatEventChatsLoadedImplCopyWith(_$ChatEventChatsLoadedImpl value,
$Res Function(_$ChatEventChatsLoadedImpl) then) =
__$$ChatEventChatsLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({String? currentUserId});
}
/// @nodoc
class __$$ChatEventChatsLoadedImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventChatsLoadedImpl>
implements _$$ChatEventChatsLoadedImplCopyWith<$Res> {
__$$ChatEventChatsLoadedImplCopyWithImpl(_$ChatEventChatsLoadedImpl _value,
$Res Function(_$ChatEventChatsLoadedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? currentUserId = freezed,
}) {
return _then(_$ChatEventChatsLoadedImpl(
currentUserId: freezed == currentUserId
? _value.currentUserId
: currentUserId // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
class _$ChatEventChatsLoadedImpl implements ChatEventChatsLoaded {
const _$ChatEventChatsLoadedImpl({this.currentUserId});
@override
final String? currentUserId;
@override
String toString() {
return 'ChatEvent.chatsLoaded(currentUserId: $currentUserId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventChatsLoadedImpl &&
(identical(other.currentUserId, currentUserId) ||
other.currentUserId == currentUserId));
}
@override
int get hashCode => Object.hash(runtimeType, currentUserId);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatEventChatsLoadedImplCopyWith<_$ChatEventChatsLoadedImpl>
get copyWith =>
__$$ChatEventChatsLoadedImplCopyWithImpl<_$ChatEventChatsLoadedImpl>(
this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return chatsLoaded(currentUserId);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return chatsLoaded?.call(currentUserId);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (chatsLoaded != null) {
return chatsLoaded(currentUserId);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return chatsLoaded(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return chatsLoaded?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (chatsLoaded != null) {
return chatsLoaded(this);
}
return orElse();
}
}
abstract class ChatEventChatsLoaded implements ChatEvent {
const factory ChatEventChatsLoaded({final String? currentUserId}) =
_$ChatEventChatsLoadedImpl;
String? get currentUserId;
@JsonKey(ignore: true)
_$$ChatEventChatsLoadedImplCopyWith<_$ChatEventChatsLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatEventChatSelectedImplCopyWith<$Res> {
factory _$$ChatEventChatSelectedImplCopyWith(
_$ChatEventChatSelectedImpl value,
$Res Function(_$ChatEventChatSelectedImpl) then) =
__$$ChatEventChatSelectedImplCopyWithImpl<$Res>;
@useResult
$Res call({String chatId});
}
/// @nodoc
class __$$ChatEventChatSelectedImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventChatSelectedImpl>
implements _$$ChatEventChatSelectedImplCopyWith<$Res> {
__$$ChatEventChatSelectedImplCopyWithImpl(_$ChatEventChatSelectedImpl _value,
$Res Function(_$ChatEventChatSelectedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? chatId = null,
}) {
return _then(_$ChatEventChatSelectedImpl(
null == chatId
? _value.chatId
: chatId // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
class _$ChatEventChatSelectedImpl implements ChatEventChatSelected {
const _$ChatEventChatSelectedImpl(this.chatId);
@override
final String chatId;
@override
String toString() {
return 'ChatEvent.chatSelected(chatId: $chatId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventChatSelectedImpl &&
(identical(other.chatId, chatId) || other.chatId == chatId));
}
@override
int get hashCode => Object.hash(runtimeType, chatId);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatEventChatSelectedImplCopyWith<_$ChatEventChatSelectedImpl>
get copyWith => __$$ChatEventChatSelectedImplCopyWithImpl<
_$ChatEventChatSelectedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return chatSelected(chatId);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return chatSelected?.call(chatId);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (chatSelected != null) {
return chatSelected(chatId);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return chatSelected(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return chatSelected?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (chatSelected != null) {
return chatSelected(this);
}
return orElse();
}
}
abstract class ChatEventChatSelected implements ChatEvent {
const factory ChatEventChatSelected(final String chatId) =
_$ChatEventChatSelectedImpl;
String get chatId;
@JsonKey(ignore: true)
_$$ChatEventChatSelectedImplCopyWith<_$ChatEventChatSelectedImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatEventMessagesRequestedImplCopyWith<$Res> {
factory _$$ChatEventMessagesRequestedImplCopyWith(
_$ChatEventMessagesRequestedImpl value,
$Res Function(_$ChatEventMessagesRequestedImpl) then) =
__$$ChatEventMessagesRequestedImplCopyWithImpl<$Res>;
@useResult
$Res call({String chatId, String? cursor});
}
/// @nodoc
class __$$ChatEventMessagesRequestedImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventMessagesRequestedImpl>
implements _$$ChatEventMessagesRequestedImplCopyWith<$Res> {
__$$ChatEventMessagesRequestedImplCopyWithImpl(
_$ChatEventMessagesRequestedImpl _value,
$Res Function(_$ChatEventMessagesRequestedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? chatId = null,
Object? cursor = freezed,
}) {
return _then(_$ChatEventMessagesRequestedImpl(
null == chatId
? _value.chatId
: chatId // ignore: cast_nullable_to_non_nullable
as String,
cursor: freezed == cursor
? _value.cursor
: cursor // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
class _$ChatEventMessagesRequestedImpl implements ChatEventMessagesRequested {
const _$ChatEventMessagesRequestedImpl(this.chatId, {this.cursor});
@override
final String chatId;
@override
final String? cursor;
@override
String toString() {
return 'ChatEvent.messagesRequested(chatId: $chatId, cursor: $cursor)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventMessagesRequestedImpl &&
(identical(other.chatId, chatId) || other.chatId == chatId) &&
(identical(other.cursor, cursor) || other.cursor == cursor));
}
@override
int get hashCode => Object.hash(runtimeType, chatId, cursor);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatEventMessagesRequestedImplCopyWith<_$ChatEventMessagesRequestedImpl>
get copyWith => __$$ChatEventMessagesRequestedImplCopyWithImpl<
_$ChatEventMessagesRequestedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return messagesRequested(chatId, cursor);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return messagesRequested?.call(chatId, cursor);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (messagesRequested != null) {
return messagesRequested(chatId, cursor);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return messagesRequested(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return messagesRequested?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (messagesRequested != null) {
return messagesRequested(this);
}
return orElse();
}
}
abstract class ChatEventMessagesRequested implements ChatEvent {
const factory ChatEventMessagesRequested(final String chatId,
{final String? cursor}) = _$ChatEventMessagesRequestedImpl;
String get chatId;
String? get cursor;
@JsonKey(ignore: true)
_$$ChatEventMessagesRequestedImplCopyWith<_$ChatEventMessagesRequestedImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatEventMessageSentImplCopyWith<$Res> {
factory _$$ChatEventMessageSentImplCopyWith(_$ChatEventMessageSentImpl value,
$Res Function(_$ChatEventMessageSentImpl) then) =
__$$ChatEventMessageSentImplCopyWithImpl<$Res>;
@useResult
$Res call({String chatId, String content});
}
/// @nodoc
class __$$ChatEventMessageSentImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventMessageSentImpl>
implements _$$ChatEventMessageSentImplCopyWith<$Res> {
__$$ChatEventMessageSentImplCopyWithImpl(_$ChatEventMessageSentImpl _value,
$Res Function(_$ChatEventMessageSentImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? chatId = null,
Object? content = null,
}) {
return _then(_$ChatEventMessageSentImpl(
null == chatId
? _value.chatId
: chatId // ignore: cast_nullable_to_non_nullable
as String,
null == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
class _$ChatEventMessageSentImpl implements ChatEventMessageSent {
const _$ChatEventMessageSentImpl(this.chatId, this.content);
@override
final String chatId;
@override
final String content;
@override
String toString() {
return 'ChatEvent.messageSent(chatId: $chatId, content: $content)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventMessageSentImpl &&
(identical(other.chatId, chatId) || other.chatId == chatId) &&
(identical(other.content, content) || other.content == content));
}
@override
int get hashCode => Object.hash(runtimeType, chatId, content);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatEventMessageSentImplCopyWith<_$ChatEventMessageSentImpl>
get copyWith =>
__$$ChatEventMessageSentImplCopyWithImpl<_$ChatEventMessageSentImpl>(
this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return messageSent(chatId, content);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return messageSent?.call(chatId, content);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (messageSent != null) {
return messageSent(chatId, content);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return messageSent(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return messageSent?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (messageSent != null) {
return messageSent(this);
}
return orElse();
}
}
abstract class ChatEventMessageSent implements ChatEvent {
const factory ChatEventMessageSent(
final String chatId, final String content) = _$ChatEventMessageSentImpl;
String get chatId;
String get content;
@JsonKey(ignore: true)
_$$ChatEventMessageSentImplCopyWith<_$ChatEventMessageSentImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatEventFavoritesRequestedImplCopyWith<$Res> {
factory _$$ChatEventFavoritesRequestedImplCopyWith(
_$ChatEventFavoritesRequestedImpl value,
$Res Function(_$ChatEventFavoritesRequestedImpl) then) =
__$$ChatEventFavoritesRequestedImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ChatEventFavoritesRequestedImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventFavoritesRequestedImpl>
implements _$$ChatEventFavoritesRequestedImplCopyWith<$Res> {
__$$ChatEventFavoritesRequestedImplCopyWithImpl(
_$ChatEventFavoritesRequestedImpl _value,
$Res Function(_$ChatEventFavoritesRequestedImpl) _then)
: super(_value, _then);
}
/// @nodoc
class _$ChatEventFavoritesRequestedImpl implements ChatEventFavoritesRequested {
const _$ChatEventFavoritesRequestedImpl();
@override
String toString() {
return 'ChatEvent.favoritesRequested()';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventFavoritesRequestedImpl);
}
@override
int get hashCode => runtimeType.hashCode;
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return favoritesRequested();
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return favoritesRequested?.call();
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (favoritesRequested != null) {
return favoritesRequested();
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return favoritesRequested(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return favoritesRequested?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (favoritesRequested != null) {
return favoritesRequested(this);
}
return orElse();
}
}
abstract class ChatEventFavoritesRequested implements ChatEvent {
const factory ChatEventFavoritesRequested() =
_$ChatEventFavoritesRequestedImpl;
}
/// @nodoc
abstract class _$$ChatEventTypingUpdatedImplCopyWith<$Res> {
factory _$$ChatEventTypingUpdatedImplCopyWith(
_$ChatEventTypingUpdatedImpl value,
$Res Function(_$ChatEventTypingUpdatedImpl) then) =
__$$ChatEventTypingUpdatedImplCopyWithImpl<$Res>;
@useResult
$Res call({String chatId, String userId, bool isTyping});
}
/// @nodoc
class __$$ChatEventTypingUpdatedImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventTypingUpdatedImpl>
implements _$$ChatEventTypingUpdatedImplCopyWith<$Res> {
__$$ChatEventTypingUpdatedImplCopyWithImpl(
_$ChatEventTypingUpdatedImpl _value,
$Res Function(_$ChatEventTypingUpdatedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? chatId = null,
Object? userId = null,
Object? isTyping = null,
}) {
return _then(_$ChatEventTypingUpdatedImpl(
null == chatId
? _value.chatId
: chatId // ignore: cast_nullable_to_non_nullable
as String,
null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as String,
null == isTyping
? _value.isTyping
: isTyping // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
class _$ChatEventTypingUpdatedImpl implements ChatEventTypingUpdated {
const _$ChatEventTypingUpdatedImpl(this.chatId, this.userId, this.isTyping);
@override
final String chatId;
@override
final String userId;
@override
final bool isTyping;
@override
String toString() {
return 'ChatEvent.typingUpdated(chatId: $chatId, userId: $userId, isTyping: $isTyping)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventTypingUpdatedImpl &&
(identical(other.chatId, chatId) || other.chatId == chatId) &&
(identical(other.userId, userId) || other.userId == userId) &&
(identical(other.isTyping, isTyping) ||
other.isTyping == isTyping));
}
@override
int get hashCode => Object.hash(runtimeType, chatId, userId, isTyping);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatEventTypingUpdatedImplCopyWith<_$ChatEventTypingUpdatedImpl>
get copyWith => __$$ChatEventTypingUpdatedImplCopyWithImpl<
_$ChatEventTypingUpdatedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return typingUpdated(chatId, userId, isTyping);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return typingUpdated?.call(chatId, userId, isTyping);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (typingUpdated != null) {
return typingUpdated(chatId, userId, isTyping);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return typingUpdated(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return typingUpdated?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (typingUpdated != null) {
return typingUpdated(this);
}
return orElse();
}
}
abstract class ChatEventTypingUpdated implements ChatEvent {
const factory ChatEventTypingUpdated(
final String chatId, final String userId, final bool isTyping) =
_$ChatEventTypingUpdatedImpl;
String get chatId;
String get userId;
bool get isTyping;
@JsonKey(ignore: true)
_$$ChatEventTypingUpdatedImplCopyWith<_$ChatEventTypingUpdatedImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatEventSendTypingStatusImplCopyWith<$Res> {
factory _$$ChatEventSendTypingStatusImplCopyWith(
_$ChatEventSendTypingStatusImpl value,
$Res Function(_$ChatEventSendTypingStatusImpl) then) =
__$$ChatEventSendTypingStatusImplCopyWithImpl<$Res>;
@useResult
$Res call({String chatId, bool isTyping});
}
/// @nodoc
class __$$ChatEventSendTypingStatusImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventSendTypingStatusImpl>
implements _$$ChatEventSendTypingStatusImplCopyWith<$Res> {
__$$ChatEventSendTypingStatusImplCopyWithImpl(
_$ChatEventSendTypingStatusImpl _value,
$Res Function(_$ChatEventSendTypingStatusImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? chatId = null,
Object? isTyping = null,
}) {
return _then(_$ChatEventSendTypingStatusImpl(
null == chatId
? _value.chatId
: chatId // ignore: cast_nullable_to_non_nullable
as String,
null == isTyping
? _value.isTyping
: isTyping // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
class _$ChatEventSendTypingStatusImpl implements ChatEventSendTypingStatus {
const _$ChatEventSendTypingStatusImpl(this.chatId, this.isTyping);
@override
final String chatId;
@override
final bool isTyping;
@override
String toString() {
return 'ChatEvent.sendTypingStatus(chatId: $chatId, isTyping: $isTyping)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventSendTypingStatusImpl &&
(identical(other.chatId, chatId) || other.chatId == chatId) &&
(identical(other.isTyping, isTyping) ||
other.isTyping == isTyping));
}
@override
int get hashCode => Object.hash(runtimeType, chatId, isTyping);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatEventSendTypingStatusImplCopyWith<_$ChatEventSendTypingStatusImpl>
get copyWith => __$$ChatEventSendTypingStatusImplCopyWithImpl<
_$ChatEventSendTypingStatusImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return sendTypingStatus(chatId, isTyping);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return sendTypingStatus?.call(chatId, isTyping);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (sendTypingStatus != null) {
return sendTypingStatus(chatId, isTyping);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return sendTypingStatus(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return sendTypingStatus?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (sendTypingStatus != null) {
return sendTypingStatus(this);
}
return orElse();
}
}
abstract class ChatEventSendTypingStatus implements ChatEvent {
const factory ChatEventSendTypingStatus(
final String chatId, final bool isTyping) =
_$ChatEventSendTypingStatusImpl;
String get chatId;
bool get isTyping;
@JsonKey(ignore: true)
_$$ChatEventSendTypingStatusImplCopyWith<_$ChatEventSendTypingStatusImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatEventCacheClearedImplCopyWith<$Res> {
factory _$$ChatEventCacheClearedImplCopyWith(
_$ChatEventCacheClearedImpl value,
$Res Function(_$ChatEventCacheClearedImpl) then) =
__$$ChatEventCacheClearedImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ChatEventCacheClearedImplCopyWithImpl<$Res>
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventCacheClearedImpl>
implements _$$ChatEventCacheClearedImplCopyWith<$Res> {
__$$ChatEventCacheClearedImplCopyWithImpl(_$ChatEventCacheClearedImpl _value,
$Res Function(_$ChatEventCacheClearedImpl) _then)
: super(_value, _then);
}
/// @nodoc
class _$ChatEventCacheClearedImpl implements ChatEventCacheCleared {
const _$ChatEventCacheClearedImpl();
@override
String toString() {
return 'ChatEvent.cacheCleared()';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatEventCacheClearedImpl);
}
@override
int get hashCode => runtimeType.hashCode;
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String? userId) started,
required TResult Function(String? currentUserId) chatsLoaded,
required TResult Function(String chatId) chatSelected,
required TResult Function(String chatId, String? cursor) messagesRequested,
required TResult Function(String chatId, String content) messageSent,
required TResult Function() favoritesRequested,
required TResult Function(String chatId, String userId, bool isTyping)
typingUpdated,
required TResult Function(String chatId, bool isTyping) sendTypingStatus,
required TResult Function() cacheCleared,
}) {
return cacheCleared();
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String? userId)? started,
TResult? Function(String? currentUserId)? chatsLoaded,
TResult? Function(String chatId)? chatSelected,
TResult? Function(String chatId, String? cursor)? messagesRequested,
TResult? Function(String chatId, String content)? messageSent,
TResult? Function()? favoritesRequested,
TResult? Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult? Function(String chatId, bool isTyping)? sendTypingStatus,
TResult? Function()? cacheCleared,
}) {
return cacheCleared?.call();
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String? userId)? started,
TResult Function(String? currentUserId)? chatsLoaded,
TResult Function(String chatId)? chatSelected,
TResult Function(String chatId, String? cursor)? messagesRequested,
TResult Function(String chatId, String content)? messageSent,
TResult Function()? favoritesRequested,
TResult Function(String chatId, String userId, bool isTyping)?
typingUpdated,
TResult Function(String chatId, bool isTyping)? sendTypingStatus,
TResult Function()? cacheCleared,
required TResult orElse(),
}) {
if (cacheCleared != null) {
return cacheCleared();
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(ChatEventStarted value) started,
required TResult Function(ChatEventChatsLoaded value) chatsLoaded,
required TResult Function(ChatEventChatSelected value) chatSelected,
required TResult Function(ChatEventMessagesRequested value)
messagesRequested,
required TResult Function(ChatEventMessageSent value) messageSent,
required TResult Function(ChatEventFavoritesRequested value)
favoritesRequested,
required TResult Function(ChatEventTypingUpdated value) typingUpdated,
required TResult Function(ChatEventSendTypingStatus value) sendTypingStatus,
required TResult Function(ChatEventCacheCleared value) cacheCleared,
}) {
return cacheCleared(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(ChatEventStarted value)? started,
TResult? Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult? Function(ChatEventChatSelected value)? chatSelected,
TResult? Function(ChatEventMessagesRequested value)? messagesRequested,
TResult? Function(ChatEventMessageSent value)? messageSent,
TResult? Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult? Function(ChatEventTypingUpdated value)? typingUpdated,
TResult? Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult? Function(ChatEventCacheCleared value)? cacheCleared,
}) {
return cacheCleared?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatEventStarted value)? started,
TResult Function(ChatEventChatsLoaded value)? chatsLoaded,
TResult Function(ChatEventChatSelected value)? chatSelected,
TResult Function(ChatEventMessagesRequested value)? messagesRequested,
TResult Function(ChatEventMessageSent value)? messageSent,
TResult Function(ChatEventFavoritesRequested value)? favoritesRequested,
TResult Function(ChatEventTypingUpdated value)? typingUpdated,
TResult Function(ChatEventSendTypingStatus value)? sendTypingStatus,
TResult Function(ChatEventCacheCleared value)? cacheCleared,
required TResult orElse(),
}) {
if (cacheCleared != null) {
return cacheCleared(this);
}
return orElse();
}
}
abstract class ChatEventCacheCleared implements ChatEvent {
const factory ChatEventCacheCleared() = _$ChatEventCacheClearedImpl;
}