unfollow method

Future unfollow(
  1. String? atsign
)

Implementation

Future unfollow(String? atsign) async {
  Completer c = Completer();
  try {
    setStatus(Status.loading);
    var result = await _connectionsService.unfollow(atsign);
    if (result) {
      followingList!.removeWhere((element) => element.title == atsign);
      _modifyFollowersList(atsign, false);
    }
    setStatus(Status.done);
    c.complete(true);
  } on Error catch (err) {
    this.error = err;
    setStatus(Status.error);
  } on Exception catch (ex) {
    this.error = ex;
    setStatus(Status.error);
  }
  return c.future;
}