getMessages method

  1. @override
Future<void> getMessages()
override

Implementation

@override
Future<void> getMessages() async {
  try {
    final messages = await clientService.getAllMessages();
    await localStorage.messagesDao.saveAllMessages(messages);
    callbacks.onMessagesRetrieved?.call(messages);
  } on DOOClientException catch (e) {
    callbacks.onError?.call(e);
  }
}