SubredditRef.name constructor

SubredditRef.name(
  1. Reddit reddit,
  2. String name
)

name is the name of the subreddit without the 'r/' prefix.

Implementation

SubredditRef.name(Reddit reddit, String name)
    : _name = name,
      super.withPath(reddit, _generateInfoPath(name)) {
  _path =
      apiPath['subreddit'].replaceAll(SubredditRef._subredditRegExp, _name);
}