fromJson static method
Implementation
static Call? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return Call(
id: (json['id'] as int?) ?? 0,
uniqueId:
int.tryParse((json['unique_id'] as dynamic)?.toString() ?? '') ?? 0,
userId: (json['user_id'] as int?) ?? 0,
isOutgoing: (json['is_outgoing'] as bool?) ?? false,
isVideo: (json['is_video'] as bool?) ?? false,
state: CallState.fromJson(tdMapFromJson(json['state'])),
);
}