Annotations.toMCP constructor

Annotations.toMCP(
  1. Map<String, Object?> map
)

Implementation

factory Annotations.toMCP(Map<String, Object?> map) {
  return Annotations(
    priority: map['priority'] as int?,
    lastModified: map['lastModified'] as String?,
    audience: map['audience'] != null
        ? (map['audience'] as List<dynamic>)
            .map((e) => Role.to(e as String))
            .toList()
        : null,
  );
}