class Session { bool rememberMe; String? host; String? email; String? token; String? password; String? instanceId; int? role; Session({required this.rememberMe, this.host, this.email, this.token, this.password, this.instanceId, this.role}); factory Session.fromJson(Map json) { return new Session( rememberMe: json['rememberMe'] as bool, host: json['host'] as String?, email: json['email'] as String?, token: json['token'] as String?, password: json['password'] as String?, instanceId: json['instanceId'] as String?, role: json['role'] as int?, ); } Map toMap() { return { 'rememberMe': rememberMe, 'host': host, 'email': email, 'token': token, 'password': password, 'instanceId': instanceId, 'role': role, }; } @override String toString() { return '{rememberMe: $rememberMe, host: $host, email: $email, token: $token, password: $password, instanceId: $instanceId, role: $role}'; } }