toJsonMap static method
Convert Token to JSON map.
Implementation
static Map toJsonMap(Token model) {
var ret = {};
if (model.accessToken != null) {
ret['access_token'] = model.accessToken;
}
if (model.tokenType != null) {
ret['token_type'] = model.tokenType;
}
if (model.refreshToken != null) {
ret['refresh_token'] = model.refreshToken;
}
if (model.expiresIn != null) {
ret['expires_in'] = model.expiresIn;
}
if (model.expireTimeStamp != null) {
ret['expire_timestamp'] = model.expireTimeStamp!.millisecondsSinceEpoch;
}
if (model.idToken != null) {
ret['id_token'] = model.idToken;
}
return ret;
}