Widget.selectableText constructor Null safety

const Widget.selectableText(
  1. String data,
  2. {Key? key,
  3. TextStyle? style,
  4. StrutStyle? strutStyle,
  5. TextAlign? textAlign,
  6. TextDirection? textDirection,
  7. double? textScaleFactor,
  8. @Default(false) bool showCursor,
  9. @Default(false) bool autofocus,
  10. int? minLines,
  11. int? maxLines,
  12. @Default(2.0) double cursorWidth,
  13. double? cursorHeight,
  14. Radius? cursorRadius,
  15. Color? cursorColor,
  16. @Default(BoxHeightStyle.tight) BoxHeightStyle selectionHeightStyle,
  17. @Default(BoxWidthStyle.tight) BoxWidthStyle selectionWidthStyle,
  18. @Default(DragStartBehavior.start) DragStartBehavior dragStartBehavior,
  19. @Default(true) bool enableInteractiveSelection,
  20. Callback? onTap,
  21. ScrollPhysics? scrollPhysics,
  22. String? semanticsLabel,
  23. TextHeightBehavior? textHeightBehavior,
  24. TextWidthBasis? textWidthBasis}
)

Implementation

const factory Widget.selectableText(
  String data, {
  Key? key,
  TextStyle? style,
  StrutStyle? strutStyle,
  TextAlign? textAlign,
  TextDirection? textDirection,
  double? textScaleFactor,
  @Default(false) bool showCursor,
  @Default(false) bool autofocus,
  int? minLines,
  int? maxLines,
  @Default(2.0) double cursorWidth,
  double? cursorHeight,
  Radius? cursorRadius,
  Color? cursorColor,
  @Default(BoxHeightStyle.tight) BoxHeightStyle selectionHeightStyle,
  @Default(BoxWidthStyle.tight) BoxWidthStyle selectionWidthStyle,
  @Default(DragStartBehavior.start) DragStartBehavior dragStartBehavior,
  @Default(true) bool enableInteractiveSelection,
  Callback? onTap,
  ScrollPhysics? scrollPhysics,
  String? semanticsLabel,
  TextHeightBehavior? textHeightBehavior,
  TextWidthBasis? textWidthBasis,
}) = SelectableText;