Initial framework in place, non-functional POST & env vars atm
This commit is contained in:
parent
3bc940063a
commit
5c718fc14b
29 changed files with 1263 additions and 170 deletions
21
lib/model/json/login_model.dart
Normal file
21
lib/model/json/login_model.dart
Normal file
|
@ -0,0 +1,21 @@
|
|||
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,
|
||||
};
|
||||
}
|
Reference in a new issue