StructuredFormatting.fromJson constructor

StructuredFormatting.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory StructuredFormatting.fromJson(Map<String, dynamic> json) =>
    StructuredFormatting(
      mainText: json["main_text"],
      mainTextMatchedSubstrings: json["main_text_matched_substrings"] == null
          ? []
          : List<MatchedSubstring>.from(json["main_text_matched_substrings"]!
              .map((x) => MatchedSubstring.fromJson(x))),
      secondaryText: json["secondary_text"],
    );