capabilities property
DocumentCapabilities
get
capabilities
What this build tells the server it can read.
Defaults to CRDTDocument.describeBuildCapabilities, sent as
incomplete: an app usually opens a handler after connecting, so a kind
it does not name is passed over rather than refused. One passed at
construction is sent as complete, and a kind left out refuses the client.
Either way, a kind that is named is checked in full: a missing operation kind, or a snapshot blob of another layout, refuses the client.
One passed at construction also names
CRDTDocument.builtInCapabilities, which every build reads.
Implementation
DocumentCapabilities get capabilities {
final declared = _declaredCapabilities;
if (declared == null) {
return document.describeBuildCapabilities();
}
return DocumentCapabilities({
...CRDTDocument.builtInCapabilities.byHandlerType,
...declared.byHandlerType,
});
}