plainArray static method

List<Map<String, dynamic>> plainArray(
  1. String text
)

Helper method to create a simple plain text array

This is a convenience method for the common case of a single plain text string in a rich text array.

Example:

final richTextArray = RichTextBuilder.plainArray('Simple text');
// Equivalent to: [RichTextBuilder.text('Simple text').toJson()]

Implementation

static List<Map<String, dynamic>> plainArray(String text) => [
      RichTextBuilder.text(text).toJson(),
    ];