ResourceContent constructor

ResourceContent({
  1. required String uri,
  2. String? mimeType,
  3. String? text,
  4. String? blob,
  5. Object? annotations,
  6. Map<String, Object?>? meta,
})

annotations is the 2.x map or an Annotations.

Implementation

ResourceContent({
  required String uri,
  String? mimeType,
  String? text,
  String? blob,
  Object? annotations,
  Map<String, Object?>? meta,
}) : _block = EmbeddedResource(
        resource: ResourceContentInfo(uri: uri, mimeType: mimeType, text: text, blob: blob),
        annotations: annotations is Map
            ? Annotations.fromJson(Map<String, Object?>.from(annotations))
            : annotations as Annotations?,
        meta: meta,
      );