cast<T> method
Casts the full document payload to a typed object using fromJson.
Throws if the full document is not present.
Implementation
T cast<T>(T Function(JsonMap documentId) fromJson) {
if (fullDocument == null) {
throw StateError('No full document available for this change.');
}
return fromJson(fullDocument!);
}