platform/test/shared.dart

22 lines
461 B
Dart
Raw Normal View History

2016-11-28 05:02:12 +00:00
import "package:angel_framework/src/defs.dart";
2016-06-24 21:06:57 +00:00
class Postcard extends MemoryModel {
String location;
String message;
Postcard({String this.location, String this.message});
@override
bool operator ==(other) {
2016-12-10 17:28:24 +00:00
if (!(other is Postcard)) return false;
2016-06-24 21:06:57 +00:00
2016-12-10 17:28:24 +00:00
return id == other.id &&
location == other.location &&
2016-06-24 21:06:57 +00:00
message == other.message;
}
2016-12-10 17:28:24 +00:00
Map toJson() {
return {'id': id, 'location': location, 'message': message};
}
}