admin
2021-11-27 3465ac6e980f1473e4f42ba3eaafc7815423efec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import 'package:locations/model/map/location_model.dart';
 
class SosRecordModel {
  SosRecordModel({
    String? portrait,
    String? from,
    String? desc,
    String? phone,
    SimpleLocation? location,
    String? createTime,
    String? targetDesc,
  }) {
    _portrait = portrait;
    _from = from;
    _desc = desc;
    _phone = phone;
    _location = location;
    _createTime = createTime;
    _targetDesc = targetDesc;
  }
 
  SosRecordModel.fromJson(dynamic json) {
    _portrait = json['portrait'];
    _from = json['from'];
    _desc = json['desc'];
    _phone = json['phone'];
    _location =SimpleLocation.fromJson(json['location']);
    _createTime = json['createTime'];
    _targetDesc = json['targetDesc'];
  }
 
  String? _portrait;
  String? _from;
  String? _desc;
  String? _phone;
  SimpleLocation? _location;
  String? _createTime;
  String? _targetDesc;
 
  String? get portrait => _portrait;
 
  String? get from => _from;
 
  String? get desc => _desc;
 
  String? get phone => _phone;
 
  SimpleLocation? get location => _location;
 
  String? get createTime => _createTime;
 
  String? get targetDesc => _targetDesc;
 
  Map<String?, dynamic> toJson() {
    final map = <String?, dynamic>{};
    map['portrait'] = _portrait;
    map['from'] = _from;
    map['desc'] = _desc;
    map['phone'] = _phone;
    if (_location != null) {
      map['location'] = _location!.toJson();
    }
    map['createTime'] = _createTime;
    map['targetDesc'] = _targetDesc;
    return map;
  }
}