optOut method

Future<void> optOut()

Opt-out the current User to seeing the quarantined Subreddit.

When trying to request content from a quarantined subreddit, a DRAWAuthenticationError is thrown if the current User has not opted in to see content from that subreddit.

Implementation

Future<void> optOut() async {
  final data = {'sr_name': _subreddit.displayName};
  await _subreddit.reddit
      .post(apiPath['quarantine_opt_out'], data, discardResponse: true);
}