deleteChat method

  1. @override
Future<void> deleteChat(
  1. ChatModel chat
)
override

Deletes the chat for this user and the other users in the chat.

Implementation

@override
Future<void> deleteChat(ChatModel chat) {
  _chats.removeWhere((element) => element.id == chat.id);
  _chatsController.add(_chats);
  notifyListeners();
  debugPrint('Chat deleted: $chat');
  return Future.value();
}