protocolVersion property

String get protocolVersion

The A2UI protocol version this catalog targets ('1.0', 'v0.9.1', or 'v0.9').

Canonicalized from the document's protocolVersion (so '1.0.0' reads as '1.0' and '0.9' as 'v0.9'). Catalogs constructed in Dart via A2uiCatalog.new default to '1.0'; documents loaded with A2uiCatalog.fromJson without a protocolVersion target 'v0.9', matching the specification.

Implementation

String get protocolVersion => switch (_extra['protocolVersion']) {
  final String v => canonicalizeA2uiVersion(v) ?? v,
  _ => 'v0.9',
};