admin
2021-12-03 f092e392700f68cdbfc545c9801f530d19fd39fa
lib/model/sos/sos_record_model.dart
@@ -9,6 +9,7 @@
    SimpleLocation? location,
    String? createTime,
    String? targetDesc,
    int? targetUid
  }) {
    _portrait = portrait;
    _from = from;
@@ -17,6 +18,7 @@
    _location = location;
    _createTime = createTime;
    _targetDesc = targetDesc;
    _targetUid = targetUid;
  }
  SosRecordModel.fromJson(dynamic json) {
@@ -24,9 +26,10 @@
    _from = json['from'];
    _desc = json['desc'];
    _phone = json['phone'];
    _location =SimpleLocation.fromJson(json['location']);
    _location = SimpleLocation.fromJson(json['location']);
    _createTime = json['createTime'];
    _targetDesc = json['targetDesc'];
    _targetUid =int.parse( json['targetUid']);
  }
  String? _portrait;
@@ -36,6 +39,7 @@
  SimpleLocation? _location;
  String? _createTime;
  String? _targetDesc;
  int? _targetUid;
  String? get portrait => _portrait;
@@ -51,6 +55,8 @@
  String? get targetDesc => _targetDesc;
  int? get targetUid => _targetUid;
  Map<String?, dynamic> toJson() {
    final map = <String?, dynamic>{};
    map['portrait'] = _portrait;
@@ -62,6 +68,7 @@
    }
    map['createTime'] = _createTime;
    map['targetDesc'] = _targetDesc;
    map['targetUid'] = _targetUid;
    return map;
  }
}