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

17 lines
936 B
Dart

import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_event.freezed.dart';
@freezed
class ChatEvent with _$ChatEvent {
const factory ChatEvent.started({String? userId}) = ChatEventStarted;
const factory ChatEvent.chatsLoaded({String? currentUserId}) = ChatEventChatsLoaded;
const factory ChatEvent.chatSelected(String chatId) = ChatEventChatSelected;
const factory ChatEvent.messagesRequested(String chatId, {String? cursor}) = ChatEventMessagesRequested;
const factory ChatEvent.messageSent(String chatId, String content) = ChatEventMessageSent;
const factory ChatEvent.favoritesRequested() = ChatEventFavoritesRequested;
const factory ChatEvent.typingUpdated(String chatId, String userId, bool isTyping) = ChatEventTypingUpdated;
const factory ChatEvent.sendTypingStatus(String chatId, bool isTyping) = ChatEventSendTypingStatus;
const factory ChatEvent.cacheCleared() = ChatEventCacheCleared;
}