getChatById method
- String id
override
Retrieves a chat based on the ID.
Implementation
@override
Future<ChatModel> getChatById(String id) {
var chat = _chats.firstWhere((element) => element.id == id);
debugPrint('Retrieved chat by ID: $chat');
debugPrint('Messages are: ${chat.messages?.length}');
return Future.value(chat);
}