ParagraphStyle.fromJson constructor

ParagraphStyle.fromJson(
  1. Map json_
)

Implementation

ParagraphStyle.fromJson(core.Map json_)
    : this(
        alignment: json_.containsKey('alignment')
            ? json_['alignment'] as core.String
            : null,
        avoidWidowAndOrphan: json_.containsKey('avoidWidowAndOrphan')
            ? json_['avoidWidowAndOrphan'] as core.bool
            : null,
        borderBetween: json_.containsKey('borderBetween')
            ? ParagraphBorder.fromJson(
                json_['borderBetween'] as core.Map<core.String, core.dynamic>)
            : null,
        borderBottom: json_.containsKey('borderBottom')
            ? ParagraphBorder.fromJson(
                json_['borderBottom'] as core.Map<core.String, core.dynamic>)
            : null,
        borderLeft: json_.containsKey('borderLeft')
            ? ParagraphBorder.fromJson(
                json_['borderLeft'] as core.Map<core.String, core.dynamic>)
            : null,
        borderRight: json_.containsKey('borderRight')
            ? ParagraphBorder.fromJson(
                json_['borderRight'] as core.Map<core.String, core.dynamic>)
            : null,
        borderTop: json_.containsKey('borderTop')
            ? ParagraphBorder.fromJson(
                json_['borderTop'] as core.Map<core.String, core.dynamic>)
            : null,
        direction: json_.containsKey('direction')
            ? json_['direction'] as core.String
            : null,
        headingId: json_.containsKey('headingId')
            ? json_['headingId'] as core.String
            : null,
        indentEnd: json_.containsKey('indentEnd')
            ? Dimension.fromJson(
                json_['indentEnd'] as core.Map<core.String, core.dynamic>)
            : null,
        indentFirstLine: json_.containsKey('indentFirstLine')
            ? Dimension.fromJson(json_['indentFirstLine']
                as core.Map<core.String, core.dynamic>)
            : null,
        indentStart: json_.containsKey('indentStart')
            ? Dimension.fromJson(
                json_['indentStart'] as core.Map<core.String, core.dynamic>)
            : null,
        keepLinesTogether: json_.containsKey('keepLinesTogether')
            ? json_['keepLinesTogether'] as core.bool
            : null,
        keepWithNext: json_.containsKey('keepWithNext')
            ? json_['keepWithNext'] as core.bool
            : null,
        lineSpacing: json_.containsKey('lineSpacing')
            ? (json_['lineSpacing'] as core.num).toDouble()
            : null,
        namedStyleType: json_.containsKey('namedStyleType')
            ? json_['namedStyleType'] as core.String
            : null,
        pageBreakBefore: json_.containsKey('pageBreakBefore')
            ? json_['pageBreakBefore'] as core.bool
            : null,
        shading: json_.containsKey('shading')
            ? Shading.fromJson(
                json_['shading'] as core.Map<core.String, core.dynamic>)
            : null,
        spaceAbove: json_.containsKey('spaceAbove')
            ? Dimension.fromJson(
                json_['spaceAbove'] as core.Map<core.String, core.dynamic>)
            : null,
        spaceBelow: json_.containsKey('spaceBelow')
            ? Dimension.fromJson(
                json_['spaceBelow'] as core.Map<core.String, core.dynamic>)
            : null,
        spacingMode: json_.containsKey('spacingMode')
            ? json_['spacingMode'] as core.String
            : null,
        tabStops: json_.containsKey('tabStops')
            ? (json_['tabStops'] as core.List)
                .map((value) => TabStop.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );