31 lines
713 B
Dart
31 lines
713 B
Dart
class Session {
|
|
bool isRememberMe;
|
|
String host;
|
|
String email;
|
|
String password;
|
|
|
|
Session({this.isRememberMe, this.host, this.email, this.password});
|
|
|
|
factory Session.fromJson(Map<String, dynamic> json) {
|
|
return new Session(
|
|
isRememberMe: json['isRememberMe'] as bool,
|
|
host: json['host'] as String,
|
|
email: json['email'] as String,
|
|
password: json['password'] as String
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toMap() {
|
|
return {
|
|
'isRememberMe': isRememberMe,
|
|
'host': host,
|
|
'email': email,
|
|
'password': password
|
|
};
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return '{isRememberMe: $isRememberMe, host: $host, email: $email, password: $password}';
|
|
}
|
|
} |