LogError.fromJson constructor
LogError.fromJson(
- Map<String, dynamic> map
)
Implementation
factory LogError.fromJson(Map<String, dynamic> map) {
return LogError(
id: DbQueryField.tryParseObjectId(map['_id']),
bsid: DbQueryField.tryParseObjectId(map['_bsid']),
time: DbQueryField.tryParseInt(map['_time']),
extra: map['_extra'] is Map ? DbJsonWraper.fromJson(map['_extra']) : map['_extra'],
trans: (map['_trans'] as List?)?.map((v) => DbQueryField.parseObjectId(v)).toList(),
uid: DbQueryField.tryParseObjectId(map['uid']),
clientVersion: DbQueryField.tryParseInt(map['clientVersion']),
deviceType: DbQueryField.tryParseString(map['deviceType']),
deviceVersion: DbQueryField.tryParseString(map['deviceVersion']),
deviceDetail: map['deviceDetail'] is Map ? DbJsonWraper.fromJson(map['deviceDetail']) : map['deviceDetail'],
errorDetail: map['errorDetail'] is Map ? DbJsonWraper.fromJson(map['errorDetail']) : map['errorDetail'],
errorTime: DbQueryField.tryParseInt(map['errorTime']),
finished: DbQueryField.tryParseBool(map['finished']),
);
}