This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
2019-05-08 18:54:14 +00:00
|
|
|
class LoginModel {
|
2019-08-19 14:02:02 +00:00
|
|
|
LoginModel(this.userName, this.token, this.userType);
|
2019-05-08 18:54:14 +00:00
|
|
|
|
|
|
|
LoginModel.fromJson(Map<String, dynamic> json)
|
2019-05-10 11:43:45 +00:00
|
|
|
: userName = json['display_name'],
|
2019-08-19 14:02:02 +00:00
|
|
|
userType = json['user_type'],
|
2019-05-10 11:43:45 +00:00
|
|
|
token = json['session_key'];
|
2019-05-08 18:54:14 +00:00
|
|
|
|
2019-08-21 13:53:52 +00:00
|
|
|
final String userName;
|
|
|
|
final String token;
|
|
|
|
final String userType;
|
|
|
|
|
2019-05-08 18:54:14 +00:00
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
'name': userName,
|
2019-08-19 14:02:02 +00:00
|
|
|
'user_type': userType,
|
2019-05-08 18:54:14 +00:00
|
|
|
'token': token,
|
|
|
|
};
|
|
|
|
}
|