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.
LocalSpend-Tracker/lib/model/json/login_model.dart

19 lines
444 B
Dart
Raw Permalink Normal View History

class LoginModel {
LoginModel(this.userName, this.token, this.userType);
LoginModel.fromJson(Map<String, dynamic> json)
: userName = json['display_name'],
userType = json['user_type'],
token = json['session_key'];
final String userName;
final String token;
final String userType;
Map<String, dynamic> toJson() => {
'name': userName,
'user_type': userType,
'token': token,
};
}