getConversationDraft method

Future<ConversationDraft> getConversationDraft({
  1. required int talkMode,
  2. required int toFromId,
})

读取本机草稿(不跨端)。无草稿时 ConversationDraft.text 为空。

Implementation

Future<ConversationDraft> getConversationDraft({
  required int talkMode,
  required int toFromId,
}) async {
  final local = await _store.getConversation(talkMode, toFromId);
  return ConversationDraft.decode(local?.draftText ?? '');
}