Text constructor

const Text(
  1. String data, [
  2. List<Object>? attributes
])

Creates a Text.

If there are duplicated types in attributes, the last one will be used. If there are unsupported types in attributes (such as boolean), they will be ignored.

Implementation

const Text(this.data, [this.attributes]);