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
Felix 55310068ea Code is B-E-A-U-TIFUL! All complies to standards.
Complies to flutter/dart 'pedantic' coding standards (their name, not mine)
2019-08-21 14:53:52 +01:00

18 lines
444 B
Dart

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,
};
}