aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/models/user.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/user.dart')
-rw-r--r--lib/models/user.dart21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/models/user.dart b/lib/models/user.dart
new file mode 100644
index 0000000..89e3ace
--- /dev/null
+++ b/lib/models/user.dart
@@ -0,0 +1,21 @@
+class User {
+ String _email;
+ String _password;
+ User(this._email, this._password);
+
+ User.map(dynamic obj) {
+ this._email = obj["email"];
+ this._password = obj["password"];
+ }
+
+ String get email => _email;
+ String get password => _password;
+
+ Map<String, dynamic> toMap() {
+ var map = new Map<String, dynamic>();
+ map["email"] = _email;
+ map["password"] = _password;
+
+ return map;
+ }
+}