1273 lines
45 KiB
Dart
1273 lines
45 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() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) =>
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) =>
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
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() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) {
|
|
return started();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) {
|
|
return started?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
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>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ChatEventChatsLoadedImplCopyWithImpl<$Res>
|
|
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventChatsLoadedImpl>
|
|
implements _$$ChatEventChatsLoadedImplCopyWith<$Res> {
|
|
__$$ChatEventChatsLoadedImplCopyWithImpl(_$ChatEventChatsLoadedImpl _value,
|
|
$Res Function(_$ChatEventChatsLoadedImpl) _then)
|
|
: super(_value, _then);
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$ChatEventChatsLoadedImpl implements ChatEventChatsLoaded {
|
|
const _$ChatEventChatsLoadedImpl();
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatEvent.chatsLoaded()';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ChatEventChatsLoadedImpl);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function() started,
|
|
required TResult Function() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) {
|
|
return chatsLoaded();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) {
|
|
return chatsLoaded?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (chatsLoaded != null) {
|
|
return chatsLoaded();
|
|
}
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (chatsLoaded != null) {
|
|
return chatsLoaded(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class ChatEventChatsLoaded implements ChatEvent {
|
|
const factory ChatEventChatsLoaded() = _$ChatEventChatsLoadedImpl;
|
|
}
|
|
|
|
/// @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() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) {
|
|
return chatSelected(chatId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) {
|
|
return chatSelected?.call(chatId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
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? lastMessageId});
|
|
}
|
|
|
|
/// @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? lastMessageId = freezed,
|
|
}) {
|
|
return _then(_$ChatEventMessagesRequestedImpl(
|
|
null == chatId
|
|
? _value.chatId
|
|
: chatId // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
lastMessageId: freezed == lastMessageId
|
|
? _value.lastMessageId
|
|
: lastMessageId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$ChatEventMessagesRequestedImpl implements ChatEventMessagesRequested {
|
|
const _$ChatEventMessagesRequestedImpl(this.chatId, {this.lastMessageId});
|
|
|
|
@override
|
|
final String chatId;
|
|
@override
|
|
final String? lastMessageId;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatEvent.messagesRequested(chatId: $chatId, lastMessageId: $lastMessageId)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ChatEventMessagesRequestedImpl &&
|
|
(identical(other.chatId, chatId) || other.chatId == chatId) &&
|
|
(identical(other.lastMessageId, lastMessageId) ||
|
|
other.lastMessageId == lastMessageId));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, chatId, lastMessageId);
|
|
|
|
@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() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) {
|
|
return messagesRequested(chatId, lastMessageId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) {
|
|
return messagesRequested?.call(chatId, lastMessageId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (messagesRequested != null) {
|
|
return messagesRequested(chatId, lastMessageId);
|
|
}
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (messagesRequested != null) {
|
|
return messagesRequested(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class ChatEventMessagesRequested implements ChatEvent {
|
|
const factory ChatEventMessagesRequested(final String chatId,
|
|
{final String? lastMessageId}) = _$ChatEventMessagesRequestedImpl;
|
|
|
|
String get chatId;
|
|
String? get lastMessageId;
|
|
@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() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) {
|
|
return messageSent(chatId, content);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) {
|
|
return messageSent?.call(chatId, content);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) {
|
|
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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
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 _$$ChatEventMessageReadImplCopyWith<$Res> {
|
|
factory _$$ChatEventMessageReadImplCopyWith(_$ChatEventMessageReadImpl value,
|
|
$Res Function(_$ChatEventMessageReadImpl) then) =
|
|
__$$ChatEventMessageReadImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({String chatId, String messageId});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ChatEventMessageReadImplCopyWithImpl<$Res>
|
|
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventMessageReadImpl>
|
|
implements _$$ChatEventMessageReadImplCopyWith<$Res> {
|
|
__$$ChatEventMessageReadImplCopyWithImpl(_$ChatEventMessageReadImpl _value,
|
|
$Res Function(_$ChatEventMessageReadImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? chatId = null,
|
|
Object? messageId = null,
|
|
}) {
|
|
return _then(_$ChatEventMessageReadImpl(
|
|
null == chatId
|
|
? _value.chatId
|
|
: chatId // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
null == messageId
|
|
? _value.messageId
|
|
: messageId // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$ChatEventMessageReadImpl implements ChatEventMessageRead {
|
|
const _$ChatEventMessageReadImpl(this.chatId, this.messageId);
|
|
|
|
@override
|
|
final String chatId;
|
|
@override
|
|
final String messageId;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatEvent.messageRead(chatId: $chatId, messageId: $messageId)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ChatEventMessageReadImpl &&
|
|
(identical(other.chatId, chatId) || other.chatId == chatId) &&
|
|
(identical(other.messageId, messageId) ||
|
|
other.messageId == messageId));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, chatId, messageId);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$ChatEventMessageReadImplCopyWith<_$ChatEventMessageReadImpl>
|
|
get copyWith =>
|
|
__$$ChatEventMessageReadImplCopyWithImpl<_$ChatEventMessageReadImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function() started,
|
|
required TResult Function() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) {
|
|
return messageRead(chatId, messageId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) {
|
|
return messageRead?.call(chatId, messageId);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (messageRead != null) {
|
|
return messageRead(chatId, messageId);
|
|
}
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) {
|
|
return messageRead(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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) {
|
|
return messageRead?.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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (messageRead != null) {
|
|
return messageRead(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class ChatEventMessageRead implements ChatEvent {
|
|
const factory ChatEventMessageRead(
|
|
final String chatId, final String messageId) = _$ChatEventMessageReadImpl;
|
|
|
|
String get chatId;
|
|
String get messageId;
|
|
@JsonKey(ignore: true)
|
|
_$$ChatEventMessageReadImplCopyWith<_$ChatEventMessageReadImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$ChatEventChatCreatedImplCopyWith<$Res> {
|
|
factory _$$ChatEventChatCreatedImplCopyWith(_$ChatEventChatCreatedImpl value,
|
|
$Res Function(_$ChatEventChatCreatedImpl) then) =
|
|
__$$ChatEventChatCreatedImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({String title, List<String> participantIds});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ChatEventChatCreatedImplCopyWithImpl<$Res>
|
|
extends _$ChatEventCopyWithImpl<$Res, _$ChatEventChatCreatedImpl>
|
|
implements _$$ChatEventChatCreatedImplCopyWith<$Res> {
|
|
__$$ChatEventChatCreatedImplCopyWithImpl(_$ChatEventChatCreatedImpl _value,
|
|
$Res Function(_$ChatEventChatCreatedImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? title = null,
|
|
Object? participantIds = null,
|
|
}) {
|
|
return _then(_$ChatEventChatCreatedImpl(
|
|
null == title
|
|
? _value.title
|
|
: title // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
null == participantIds
|
|
? _value._participantIds
|
|
: participantIds // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$ChatEventChatCreatedImpl implements ChatEventChatCreated {
|
|
const _$ChatEventChatCreatedImpl(
|
|
this.title, final List<String> participantIds)
|
|
: _participantIds = participantIds;
|
|
|
|
@override
|
|
final String title;
|
|
final List<String> _participantIds;
|
|
@override
|
|
List<String> get participantIds {
|
|
if (_participantIds is EqualUnmodifiableListView) return _participantIds;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_participantIds);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatEvent.chatCreated(title: $title, participantIds: $participantIds)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ChatEventChatCreatedImpl &&
|
|
(identical(other.title, title) || other.title == title) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._participantIds, _participantIds));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType, title, const DeepCollectionEquality().hash(_participantIds));
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$ChatEventChatCreatedImplCopyWith<_$ChatEventChatCreatedImpl>
|
|
get copyWith =>
|
|
__$$ChatEventChatCreatedImplCopyWithImpl<_$ChatEventChatCreatedImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function() started,
|
|
required TResult Function() chatsLoaded,
|
|
required TResult Function(String chatId) chatSelected,
|
|
required TResult Function(String chatId, String? lastMessageId)
|
|
messagesRequested,
|
|
required TResult Function(String chatId, String content) messageSent,
|
|
required TResult Function(String chatId, String messageId) messageRead,
|
|
required TResult Function(String title, List<String> participantIds)
|
|
chatCreated,
|
|
}) {
|
|
return chatCreated(title, participantIds);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? started,
|
|
TResult? Function()? chatsLoaded,
|
|
TResult? Function(String chatId)? chatSelected,
|
|
TResult? Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult? Function(String chatId, String content)? messageSent,
|
|
TResult? Function(String chatId, String messageId)? messageRead,
|
|
TResult? Function(String title, List<String> participantIds)? chatCreated,
|
|
}) {
|
|
return chatCreated?.call(title, participantIds);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? started,
|
|
TResult Function()? chatsLoaded,
|
|
TResult Function(String chatId)? chatSelected,
|
|
TResult Function(String chatId, String? lastMessageId)? messagesRequested,
|
|
TResult Function(String chatId, String content)? messageSent,
|
|
TResult Function(String chatId, String messageId)? messageRead,
|
|
TResult Function(String title, List<String> participantIds)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (chatCreated != null) {
|
|
return chatCreated(title, participantIds);
|
|
}
|
|
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(ChatEventMessageRead value) messageRead,
|
|
required TResult Function(ChatEventChatCreated value) chatCreated,
|
|
}) {
|
|
return chatCreated(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(ChatEventMessageRead value)? messageRead,
|
|
TResult? Function(ChatEventChatCreated value)? chatCreated,
|
|
}) {
|
|
return chatCreated?.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(ChatEventMessageRead value)? messageRead,
|
|
TResult Function(ChatEventChatCreated value)? chatCreated,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (chatCreated != null) {
|
|
return chatCreated(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class ChatEventChatCreated implements ChatEvent {
|
|
const factory ChatEventChatCreated(
|
|
final String title, final List<String> participantIds) =
|
|
_$ChatEventChatCreatedImpl;
|
|
|
|
String get title;
|
|
List<String> get participantIds;
|
|
@JsonKey(ignore: true)
|
|
_$$ChatEventChatCreatedImplCopyWith<_$ChatEventChatCreatedImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|