SHARE
TWEET

Untitled

a guest Oct 16th, 2019 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class ChatRepository{
  2.   BaseChatProvider chatProvider = ChatProvider();
  3.   Stream<List<Chat>> getChats() => chatProvider.getChats();
  4.   Stream<List<Message>> getMessages(String chatId)=> chatProvider.getMessages(chatId);
  5.  
  6.   Future<List<Message>> getPreviousMessages(
  7.           String chatId, Message prevMessage) =>
  8.       chatProvider.getPreviousMessages(chatId, prevMessage);
  9.  
  10.   Future<List<Message>> getAttachments(String chatId, int type) => chatProvider.getAttachments(chatId, type);
  11.  
  12.   Future<void> sendMessage(String chatId, Message message)=>chatProvider.sendMessage(chatId, message);
  13.  
  14.   Future<String> getChatIdByUsername(String username) =>
  15.       chatProvider.getChatIdByUsername(username);
  16.  
  17.   Future<void> createChatIdForContact(User user) =>
  18.       chatProvider.createChatIdForContact(user);
  19.  
  20.  
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top