refreshToken method
Implementation
Future<bool> refreshToken() async {
var refresh = {
"token": token,
"appKey": loginObj!.appKey,
};
token = null;
var resp = await ConnectionClient.request("auth/refreshSdkToken", refresh, HttpMethod.post);
if (resp.statusCode >= 200 && resp.statusCode < 300) {
var json = jsonDecode(resp.body);
token = json['token'];
return true;
} else {
return false;
}
}