unblockConversation method

Future<void> unblockConversation(
  1. String id
)

Implementation

Future<void> unblockConversation(String id) async {
  _loadingService.show();
  try {
    final response = await _conversationRepository
        .unblockConversation(BlockAndUnblockContactRequest(contactUid: id));
    if (response.status == 'success') {
      getSingleConversation(currentConversationId.value);
      _loadingService.showSuccess('conversation unblocked');

      update();
    }
  } catch (e) {
    if (e is DioError) {
      _loadingService.showError(
        'unable to unblock conversation...',
      );
    } else {
      _loadingService.showError(
        'unable to unblock conversation...',
      );
      //log(e.toString());
    }
  }
}