ResourceLink.toMCP constructor
Implementation
factory ResourceLink.toMCP(Map<String, Object?> map) {
return ResourceLink(
icons: map['icons'] != null
? (map['icons'] as List<dynamic>)
.map((e) => Icon.toMCP(e as Map<String, Object?>))
.toList()
: null,
name: map['name'] as String,
title: map['title'] as String?,
uri: map['uri'] as String,
description: map['description'] as String?,
size: map['size'] as int?,
data: map['data'] as String,
mimeType: map['mimeType'] as String,
annotations: map['annotations'] != null
? Annotations.toMCP(map['annotations'] as Map<String, Object?>)
: null,
$meta: map['_meta'] != null
? MetaObject.toMCP(map['_meta'] as Map<String, Object?>)
: null,
);
}