encode method

String encode()

Implementation

String encode() {
  if (!isRich) return text;
  return jsonEncode({
    'text': text,
    'ops': ops,
  });
}