fromMap static method

ComponentObjectNote? fromMap(
  1. Object? body
)

Implementation

static ComponentObjectNote? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'note');
  if (source == null) return null;
  return ComponentObjectNote(
    attachments: readList<ComponentObjectNoteAttachment>(
        source['attachments'], ComponentObjectNoteAttachment.fromMap),
    content: readText(source['content']),
    createdBy: ComponentObjectNoteCreatedBy.fromMap(source['created_by']),
    createdOn: readText(source['created_on']),
    customComponentObject: ComponentObjectNoteCustomComponentObject.fromMap(
        source['custom_component_object']),
    group: readAny(source['group']),
    href: readText(source['href']),
    id: readText(source['id']),
    lastUpdatedBy:
        ComponentObjectNoteLastUpdatedBy.fromMap(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    object: readText(source['object']),
    user: readAny(source['user']),
    version: readInteger(source['version']),
    watchers: readList<Object>(source['watchers'], readAny),
  );
}