update method
Update the stylesheet for the Subreddit.
stylesheet
is the CSS for the new stylesheet.
Implementation
Future<void> update(String stylesheet, {String? reason}) async {
final uri = apiPath['subreddit_stylesheet']
.replaceAll(SubredditRef._subredditRegExp, _subreddit.displayName);
final data = <String, String?>{
'api_type': 'json',
'op': 'save',
'reason': reason,
'stylesheet_contents': stylesheet,
};
return await _subreddit.reddit.post(uri, data);
}