AuthenticationResponse.fromJson constructor
AuthenticationResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
AuthenticationResponse.fromJson(Map<String, dynamic> json) {
isSuccess = json["isSuccess"];
if (isSuccess) {
var data = json["data"];
token = data["accessToken"];
refreshToken = data["refreshToken"];
var milliseconds = data["tokenExpireTimestamp"] as int;
tokenExpireDate = DateTime.fromMillisecondsSinceEpoch(milliseconds);
userInfo = DfApiUserInfo.fromJson(data);
} else
errorMessage = json["message"];
}