text static method

Map<String, dynamic> text(
  1. String text, {
  2. bool bold = false,
  3. bool italic = false,
  4. bool strikethrough = false,
  5. bool underline = false,
})

Implementation

static Map<String, dynamic> text(
  String text, {
  bool bold = false,
  bool italic = false,
  bool strikethrough = false,
  bool underline = false,
}) =>
    {
      'type': 'TextToken',
      'text': text,
      'style': {
        if (bold) 'bold': true,
        if (italic) 'italic': true,
        if (strikethrough) 'strikethrough': true,
        if (underline) 'underline': true,
      },
    };