android/ios-adaption feature, markdown, and augment #6
					 1 changed files with 10 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -11,6 +11,7 @@ class GetThreadResponse {
 | 
			
		|||
  final String from_name;
 | 
			
		||||
  final String from_address;
 | 
			
		||||
  final List<MailAddress> to;
 | 
			
		||||
  final bool seen;
 | 
			
		||||
 | 
			
		||||
  GetThreadResponse({
 | 
			
		||||
    required this.id,
 | 
			
		||||
| 
						 | 
				
			
			@ -20,19 +21,20 @@ class GetThreadResponse {
 | 
			
		|||
    required this.from_name,
 | 
			
		||||
    required this.from_address,
 | 
			
		||||
    required this.to,
 | 
			
		||||
    required this.seen,
 | 
			
		||||
  });
 | 
			
		||||
  factory GetThreadResponse.fromJson(Map<String, dynamic> json) {
 | 
			
		||||
    var toList = json['to'] as List<dynamic>;
 | 
			
		||||
 | 
			
		||||
    return GetThreadResponse(
 | 
			
		||||
      id: json['id'],
 | 
			
		||||
      messages: List<String>.from(json['messages']),
 | 
			
		||||
      subject: json['subject'],
 | 
			
		||||
      date: DateTime.parse(json['date']),
 | 
			
		||||
      from_name: json['from_name'],
 | 
			
		||||
      from_address: json['from_address'],
 | 
			
		||||
      to: toList.map((i) => MailAddress.fromJson(i)).toList(),
 | 
			
		||||
    );
 | 
			
		||||
        id: json['id'],
 | 
			
		||||
        messages: List<String>.from(json['messages']),
 | 
			
		||||
        subject: json['subject'],
 | 
			
		||||
        date: DateTime.parse(json['date']),
 | 
			
		||||
        from_name: json['from_name'],
 | 
			
		||||
        from_address: json['from_address'],
 | 
			
		||||
        to: toList.map((i) => MailAddress.fromJson(i)).toList(),
 | 
			
		||||
        seen: json['seen']);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue