delete method

Future delete(
  1. String atsign
)

deletes atsign from followers and following list.

Implementation

Future delete(String atsign) async {
  Completer c = Completer();
  try {
    setStatus(Status.loading);
    var result = await _connectionsService.delete(atsign);
    if (result) {
      followingList!.removeWhere((element) => element.title == atsign);
      followersList!.removeWhere((element) => element.title == atsign);
    }
    setStatus(Status.done);
    c.complete(true);
  } catch (e) {
    _logger.severe('deleting $atsign throws $e');
    this.error = e;

    setStatus(Status.error);
  }
}