EzSelectableText constructor

const EzSelectableText(
  1. String? data, {
  2. Key? key,
  3. FocusNode? focusNode,
  4. TextStyle? style,
  5. StrutStyle? strutStyle,
  6. TextAlign? textAlign = TextAlign.center,
  7. TextDirection? textDirection,
  8. double? textScaleFactor,
  9. bool showCursor = false,
  10. bool autofocus = false,
  11. int? minLines,
  12. int? maxLines,
  13. double cursorWidth = 2.0,
  14. double? cursorHeight,
  15. Radius? cursorRadius,
  16. Color? cursorColor,
  17. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  18. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  19. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  20. bool enableInteractiveSelection = true,
  21. TextSelectionControls? selectionControls,
  22. void onTap()?,
  23. ScrollPhysics scrollPhysics = const NeverScrollableScrollPhysics(),
  24. String? semanticsLabel,
  25. TextHeightBehavior? textHeightBehavior,
  26. TextWidthBasis? textWidthBasis,
  27. void onSelectionChanged(
    1. TextSelection,
    2. SelectionChangedCause?
    )?,
  28. EditableTextContextMenuBuilder? contextMenuBuilder,
  29. TextMagnifierConfiguration? magnifierConfiguration,
})

SelectableText wrapper with customized defaults

Implementation

const EzSelectableText(
  this.data, {
  this.key,
  this.focusNode,
  this.style,
  this.strutStyle,
  this.textAlign = TextAlign.center,
  this.textDirection,
  this.textScaleFactor,
  this.showCursor = false,
  this.autofocus = false,
  this.minLines,
  this.maxLines,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.selectionHeightStyle = BoxHeightStyle.tight,
  this.selectionWidthStyle = BoxWidthStyle.tight,
  this.dragStartBehavior = DragStartBehavior.start,
  this.enableInteractiveSelection = true,
  this.selectionControls,
  this.onTap,
  this.scrollPhysics = const NeverScrollableScrollPhysics(),
  this.semanticsLabel,
  this.textHeightBehavior,
  this.textWidthBasis,
  this.onSelectionChanged,
  this.contextMenuBuilder,
  this.magnifierConfiguration,
}) : super(
        data ?? '',
        key: key,
        focusNode: focusNode,
        style: style,
        strutStyle: strutStyle,
        textAlign: textAlign,
        textDirection: textDirection,
        textScaleFactor: textScaleFactor,
        showCursor: showCursor,
        autofocus: autofocus,
        minLines: minLines,
        maxLines: maxLines,
        cursorWidth: cursorWidth,
        cursorHeight: cursorHeight,
        cursorRadius: cursorRadius,
        cursorColor: cursorColor,
        selectionHeightStyle: selectionHeightStyle,
        dragStartBehavior: dragStartBehavior,
        enableInteractiveSelection: enableInteractiveSelection,
        selectionControls: selectionControls,
        onTap: onTap,
        scrollPhysics: scrollPhysics,
        semanticsLabel: semanticsLabel,
        textHeightBehavior: textHeightBehavior,
        textWidthBasis: textWidthBasis,
        onSelectionChanged: onSelectionChanged,
        magnifierConfiguration: magnifierConfiguration,
      );