StyledText constructor
StyledText({
- Key? key,
- required String text,
- bool newLineAsBreaks = true,
- TextStyle? style,
- Map<
String, StyledTextTagBase> ? tags, - TextAlign? textAlign,
- TextDirection? textDirection,
- bool? softWrap = true,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- Locale? locale,
- StrutStyle? strutStyle,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
Create a text widget with formatting via tags.
Implementation
StyledText({
Key? key,
required this.text,
this.newLineAsBreaks = true,
this.style,
Map<String, StyledTextTagBase>? tags,
this.textAlign,
this.textDirection,
this.softWrap = true,
this.overflow,
this.textScaleFactor,
this.maxLines,
this.locale,
this.strutStyle,
this.textWidthBasis,
this.textHeightBehavior,
}) : this.tags = tags ?? const {},
this.selectable = false,
this._focusNode = null,
this._showCursor = false,
this._autofocus = false,
this._toolbarOptions = null,
this._contextMenuBuilder = null,
this._selectionControls = null,
this._selectionHeightStyle = null,
this._selectionWidthStyle = null,
this._onSelectionChanged = null,
this._magnifierConfiguration = null,
this._cursorWidth = null,
this._cursorHeight = null,
this._cursorRadius = null,
this._cursorColor = null,
this._dragStartBehavior = DragStartBehavior.start,
this._enableInteractiveSelection = false,
this._onTap = null,
this._scrollPhysics = null,
this._semanticsLabel = null,
super(key: key);