StyledText constructor

StyledText({
  1. Key? key,
  2. required String text,
  3. bool newLineAsBreaks = true,
  4. TextStyle? style,
  5. Map<String, StyledTextTagBase>? tags,
  6. TextAlign? textAlign,
  7. TextDirection? textDirection,
  8. bool? softWrap = true,
  9. TextOverflow? overflow,
  10. double? textScaleFactor,
  11. int? maxLines,
  12. Locale? locale,
  13. StrutStyle? strutStyle,
  14. TextWidthBasis? textWidthBasis,
  15. 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);