Paragraph.fromJson constructor

Paragraph.fromJson(
  1. Map json_
)

Implementation

Paragraph.fromJson(core.Map json_)
    : this(
        bullet: json_.containsKey('bullet')
            ? Bullet.fromJson(
                json_['bullet'] as core.Map<core.String, core.dynamic>)
            : null,
        elements: json_.containsKey('elements')
            ? (json_['elements'] as core.List)
                .map((value) => ParagraphElement.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        paragraphStyle: json_.containsKey('paragraphStyle')
            ? ParagraphStyle.fromJson(json_['paragraphStyle']
                as core.Map<core.String, core.dynamic>)
            : null,
        positionedObjectIds: json_.containsKey('positionedObjectIds')
            ? (json_['positionedObjectIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        suggestedBulletChanges: json_.containsKey('suggestedBulletChanges')
            ? (json_['suggestedBulletChanges']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  SuggestedBullet.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        suggestedParagraphStyleChanges:
            json_.containsKey('suggestedParagraphStyleChanges')
                ? (json_['suggestedParagraphStyleChanges']
                        as core.Map<core.String, core.dynamic>)
                    .map(
                    (key, value) => core.MapEntry(
                      key,
                      SuggestedParagraphStyle.fromJson(
                          value as core.Map<core.String, core.dynamic>),
                    ),
                  )
                : null,
        suggestedPositionedObjectIds:
            json_.containsKey('suggestedPositionedObjectIds')
                ? (json_['suggestedPositionedObjectIds']
                        as core.Map<core.String, core.dynamic>)
                    .map(
                    (key, value) => core.MapEntry(
                      key,
                      ObjectReferences.fromJson(
                          value as core.Map<core.String, core.dynamic>),
                    ),
                  )
                : null,
      );