Skip to content
masterclass Buddy

Flutter & Dart · Component

Text

The Flutter Text widget displays a string or inline span. It supports inherited styles, wrapping, overflow handling, text scaling, accessibility labels, and selection.

Last updated

Syntax

const Text(String data, {Key? key, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, double? textScaleFactor, TextScaler? textScaler, int? maxLines, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, Color? selectionColor})

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • RichText
  • DefaultTextStyle
  • SelectableRegion
  • SelectionArea
  • SelectionContainer.disabled
  • TextSpan
  • TextStyle
  • TextOverflow

Source: Text class - widgets library - Dart API. Checked 2026-11-03.