unregisterFromAllTopics static method
Unregister the current device from all topics it is registred to.
@returns A future that completes once the registration is successful.
Implementation
static Future<void> unregisterFromAllTopics() async {
Map<String, String> apiParameters = await _defaultParameters();
String apiName = 'api/unregister-all';
var requestBody = json.encode(apiParameters);
Map<String, String> headers = _defaultHeaders(contentTypeJson: true);
var uri = Uri.https(_endpoint, apiName);
http.Response response = await http.post(
uri,
headers: headers,
body: requestBody,
);
_checkResponse(response.body);
}