|
@@ -1,3 +1,5 @@
|
|
|
|
+//data structures
|
|
|
|
+
|
|
import 'api_service.dart';
|
|
import 'api_service.dart';
|
|
|
|
|
|
|
|
|
|
@@ -34,7 +36,24 @@ class GetThreadResponse {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+class MailAddress {
|
|
|
|
+ final String? name;
|
|
|
|
+ final String address;
|
|
|
|
+ MailAddress({this.name, required this.address});
|
|
|
|
|
|
|
|
+ factory MailAddress.fromJson(Map<String, dynamic> json) {
|
|
|
|
+ return MailAddress(
|
|
|
|
+ name: json['name'],
|
|
|
|
+ address: json['address'],
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ String toString() {
|
|
|
|
+ // TODO: implement toString
|
|
|
|
+ return '${name} <${address}>';
|
|
|
|
+ }
|
|
|
|
+}
|
|
// //old data structure
|
|
// //old data structure
|
|
// class SerializableMessage {
|
|
// class SerializableMessage {
|
|
// final String name;
|
|
// final String name;
|