feat(chat): add init and dispose chat, typing info, receive a messages

This commit is contained in:
alex
2024-07-03 16:50:09 +03:00
parent 424ce3cb34
commit 4c7519ee4c
27 changed files with 553 additions and 167 deletions

View File

@@ -1,3 +1,4 @@
import 'package:eatvio_app/features/chat/models/chat_messages_model.dart';
import 'package:eatvio_app/features/chat/models/chat_room_model.dart';
import 'package:dio/dio.dart';
import 'package:eatvio_app/features/chat/models/websocket_info_model.dart';
@@ -10,7 +11,10 @@ abstract class ChatService {
factory ChatService(Dio dio, {String baseUrl}) = _ChatService;
@GET('/chat/show/{id}')
Future<Map<String, ChatRoomModel>> getChatRoomModel(@Path() String id);
Future<Map<String, ChatRoomModel>> getChatRoom(@Path() String id);
@GET('/chat/show/{id}/messages')
Future<ChatMessagesModel> getChatMessages(@Path() String id);
@GET('/profile/ws/params')
Future<WebsocketInfoModel> getWebsocket();