DocumentDelete.fromJson constructor
DocumentDelete.fromJson(
- Object? j
Implementation
factory DocumentDelete.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return DocumentDelete(
document: switch (json['document']) {
null => '',
Object $1 => decodeString($1),
},
removedTargetIds: switch (json['removedTargetIds']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeInt(i)],
_ => throw const FormatException('"removedTargetIds" is not a list'),
},
readTime: switch (json['readTime']) {
null => null,
Object $1 => Timestamp.fromJson($1),
},
);
}