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

21 lines
494 B
Dart

class LoginModel {
final String userName;
final String token;
final String email;
final int userId;
LoginModel(this.userName, this.token, this.email, this.userId);
LoginModel.fromJson(Map<String, dynamic> json)
: userName = json['name'],
token = json['token'],
email = json['email'],
userId = json['pk'];
Map<String, dynamic> toJson() => {
'name': userName,
'token': token,
'email': email,
'pk': userId,
};
}