This repository has been archived on 2022-04-20. You can view files and clone it, but cannot push or open issues or pull requests.
2018-09-16 19:47:33 +00:00
|
|
|
import 'package:meta/meta.dart';
|
|
|
|
|
|
|
|
class User {
|
|
|
|
final int id;
|
|
|
|
final String email, username;
|
|
|
|
|
|
|
|
User(this.id, this.email, this.username);
|
|
|
|
User.fromJson(Map<String, dynamic> json)
|
|
|
|
: id = json['id'],
|
|
|
|
email = json['email'],
|
|
|
|
username = json['username'];
|
2018-09-17 16:16:50 +00:00
|
|
|
|
|
|
|
toJSON() => {"id": this.id, "email": this.email, "username": this.username};
|
2018-09-16 19:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class UserTokenPair {
|
|
|
|
final User user;
|
|
|
|
final String token;
|
|
|
|
UserTokenPair(this.user, this.token);
|
2018-09-16 19:47:53 +00:00
|
|
|
}
|