text method

dynamic text(
  1. String text,
  2. bool? previewUrl
)

Implementation

text(String text, bool? previewUrl) {
  dynamic replayObject = {
    "type": "text",
    "text": {
      "body": text,
    }
  };

  if (previewUrl!) {
    replayObject['text']['preview_url'];
  }

  return replayObject;
}