serializeAttrText method

Map<String, dynamic> serializeAttrText(
  1. AttributedText attributedText, {
  2. AttributionSerializeBuilder? serializeBuilder,
})

Serialize the AttributedText

@return { "keyText":"Attributed text - I am text", "keySpans":[] }

Implementation

Map<String, dynamic> serializeAttrText(AttributedText attributedText,
    {AttributionSerializeBuilder? serializeBuilder}) {
  final text = attributedText.text;
  final spans = serializeSpans(
    attributedText.spans,
    serializeBuilder: serializeBuilder,
  );
  return {keyText: text, keySpans: spans};
}