savePrefs method Null safety
Static Method Send a PATCH request to the Reddit Api to update preferences
Implementation
static savePrefs(Map<String, dynamic> settingsMap) async {
ApiLauncher redditApi = ApiLauncher();
await http.patch(Uri.https("oauth.reddit.com", "api/v1/me/prefs"),
headers: {
"Authorization": "Bearer ${redditApi.redditApi.auth.credentials.accessToken}",
"Content-Type": "application/json"
},
body: json.encode(settingsMap)
);
}