changeListStatus method

Future changeListStatus(
  1. bool isFollowing,
  2. bool value
)

Implementation

Future changeListStatus(bool isFollowing, bool value) async {
  Completer c = Completer();
  try {
    setStatus(Status.loading);
    await _connectionsService.changeListPublicStatus(isFollowing, value);
    setListStatus(isFollowing, value);
    setStatus(Status.done);
    c.complete(true);
  } catch (ex) {
    this.error = ex;
    setStatus(Status.error);
  }
  return c.future;
}