TextFormat.fromJson constructor

TextFormat.fromJson(
  1. Map json_
)

Implementation

TextFormat.fromJson(core.Map json_)
  : this(
      bold: json_['bold'] as core.bool?,
      fontFamily: json_['fontFamily'] as core.String?,
      fontSize: json_['fontSize'] as core.int?,
      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_['italic'] as core.bool?,
      link: json_.containsKey('link')
          ? Link.fromJson(
              json_['link'] as core.Map<core.String, core.dynamic>,
            )
          : null,
      strikethrough: json_['strikethrough'] as core.bool?,
      underline: json_['underline'] as core.bool?,
    );