1029 lines
35 KiB
Dart
1029 lines
35 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() 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,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? 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,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? 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,
|
|
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,
|
|
}) =>
|
|
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,
|
|
}) =>
|
|
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,
|
|
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>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ChatEventStartedImplCopyWithImpl<$Res>
|
|
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventStartedImpl>
|
|
implements _$$ChatEventStartedImplCopyWith<$Res> {
|
|
__$$ChatEventStartedImplCopyWithImpl(_$ChatEventStartedImpl _value,
|
|
$Res Function(_$ChatEventStartedImpl) _then)
|
|
: super(_value, _then);
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$ChatEventStartedImpl implements ChatEventStarted {
|
|
const _$ChatEventStartedImpl();
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatEvent.started()';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType && other is _$ChatEventStartedImpl);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function() 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,
|
|
}) {
|
|
return started();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? 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,
|
|
}) {
|
|
return started?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? 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,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (started != null) {
|
|
return started();
|
|
}
|
|
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,
|
|
}) {
|
|
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,
|
|
}) {
|
|
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,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (started != null) {
|
|
return started(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class ChatEventStarted implements ChatEvent {
|
|
const factory ChatEventStarted() = _$ChatEventStartedImpl;
|
|
}
|
|
|
|
/// @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() 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,
|
|
}) {
|
|
return chatsLoaded(currentUserId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? 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,
|
|
}) {
|
|
return chatsLoaded?.call(currentUserId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? 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,
|
|
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,
|
|
}) {
|
|
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,
|
|
}) {
|
|
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,
|
|
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() 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,
|
|
}) {
|
|
return chatSelected(chatId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? 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,
|
|
}) {
|
|
return chatSelected?.call(chatId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? 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,
|
|
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,
|
|
}) {
|
|
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,
|
|
}) {
|
|
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,
|
|
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() 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,
|
|
}) {
|
|
return messagesRequested(chatId, cursor);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? 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,
|
|
}) {
|
|
return messagesRequested?.call(chatId, cursor);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? 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,
|
|
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,
|
|
}) {
|
|
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,
|
|
}) {
|
|
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,
|
|
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() 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,
|
|
}) {
|
|
return messageSent(chatId, content);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? 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,
|
|
}) {
|
|
return messageSent?.call(chatId, content);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? 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,
|
|
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,
|
|
}) {
|
|
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,
|
|
}) {
|
|
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,
|
|
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() 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,
|
|
}) {
|
|
return favoritesRequested();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? 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,
|
|
}) {
|
|
return favoritesRequested?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? 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,
|
|
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,
|
|
}) {
|
|
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,
|
|
}) {
|
|
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,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (favoritesRequested != null) {
|
|
return favoritesRequested(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class ChatEventFavoritesRequested implements ChatEvent {
|
|
const factory ChatEventFavoritesRequested() =
|
|
_$ChatEventFavoritesRequestedImpl;
|
|
}
|