Text constructor

Text(
  1. String text,
  2. {Style style = Style.reset}
)

Creates a new text widget from a string.

Optionally, a style can be provided to apply to the text.

For more complex text, consider using Text.fromSpan or Text.fromLine.

Implementation

factory Text(
  String text, {
  Style style = Style.reset,
}) {
  return Text.fromSpan(Span(text, style));
}