getUserSubreddits method Null safety
- UserDataModel userDataNotifier
Static Method Fetched the Subreddits the user is subscribed to
Fetch a list of subreddits the user is subscribed to
Implementation
static getUserSubreddits(UserDataModel userDataNotifier) async {
ApiLauncher redditApi = ApiLauncher();
if (redditApi.isFlowCreated() == false)
await redditApi.createRedditFlow();
userDataNotifier.userData.subbedThreads = await redditApi.redditApi.user.subreddits().toList();
}