TextFormat.fromJson constructor

TextFormat.fromJson(
  1. Map json_
)

Implementation

TextFormat.fromJson(core.Map json_)
    : this(
        bold: json_.containsKey('bold') ? json_['bold'] as core.bool : null,
        fontFamily: json_.containsKey('fontFamily')
            ? json_['fontFamily'] as core.String
            : null,
        fontSize: json_.containsKey('fontSize')
            ? json_['fontSize'] as core.int
            : null,
        foregroundColor: json_.containsKey('foregroundColor')
            ? Color.fromJson(json_['foregroundColor']
                as core.Map<core.String, core.dynamic>)
            : null,
        foregroundColorStyle: json_.containsKey('foregroundColorStyle')
            ? ColorStyle.fromJson(json_['foregroundColorStyle']
                as core.Map<core.String, core.dynamic>)
            : null,
        italic:
            json_.containsKey('italic') ? json_['italic'] as core.bool : null,
        link: json_.containsKey('link')
            ? Link.fromJson(
                json_['link'] as core.Map<core.String, core.dynamic>)
            : null,
        strikethrough: json_.containsKey('strikethrough')
            ? json_['strikethrough'] as core.bool
            : null,
        underline: json_.containsKey('underline')
            ? json_['underline'] as core.bool
            : null,
      );