class Token { String? refreshToken; AccessToken? accessToken; Token({ this.refreshToken, this.accessToken, }); Token.fromJson(Map json) { refreshToken = json['refreshToken']; accessToken = AccessToken?.fromJson(json['accessToken']); } Map toJson() { final data = {}; data['refreshToken'] = refreshToken; data['accessToken'] = accessToken!.toJson(); return data; } } class AccessToken { String? token; int? expiresIn; AccessToken({ this.token, this.expiresIn, }); AccessToken.fromJson(Map json) { token = json['token']; expiresIn = json['expiresIn']; } Map toJson() { final data = {}; data['token'] = token; data['expiresIn'] = expiresIn; return data; } }