hooks test
This commit is contained in:
parent
b77d6cbdfa
commit
c1b1c5a06e
1 changed files with 6 additions and 2 deletions
|
@ -117,14 +117,18 @@ class House {
|
||||||
|
|
||||||
House(this.id, this.ownerId, this.address);
|
House(this.id, this.ownerId, this.address);
|
||||||
|
|
||||||
static House fromMap(Map map) => House(
|
static House fromMap(Map map) {
|
||||||
map['id'] as String, map['owner_id'] as String, map['address'] as String);
|
print('In $map');
|
||||||
|
return House(map['id'] as String, map['owner_id'] as String,
|
||||||
|
map['address'] as String);
|
||||||
|
}
|
||||||
|
|
||||||
House withOwner(String newOwnerId) {
|
House withOwner(String newOwnerId) {
|
||||||
return House(id, newOwnerId, address);
|
return House(id, newOwnerId, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
print('Out ${{'id': id, 'owner_id': ownerId, 'address': address}}');
|
||||||
return {'id': id, 'owner_id': ownerId, 'address': address};
|
return {'id': id, 'owner_id': ownerId, 'address': address};
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue