leave method

Future<void> leave()

Have the current User remove themself from the contributors list.

Implementation

Future<void> leave() async {
  if (_subreddit is! Subreddit) {
    _subreddit = await _subreddit.populate();
  }
  final data = {
    'id': (_subreddit as Subreddit).fullname,
  };
  await _subreddit.reddit
      .post(apiPath['leavecontributor'], data, discardResponse: true);
}