DetectableEditableText constructor

DetectableEditableText({
  1. Key? key,
  2. FocusNode? focusNode,
  3. required TextEditingController controller,
  4. required TextStyle basicStyle,
  5. required TextStyle detectedStyle,
  6. required RegExp detectionRegExp,
  7. required Color cursorColor,
  8. required ValueChanged<String>? onDetectionTyped,
  9. required VoidCallback? onDetectionFinished,
  10. ValueChanged<String>? onChanged,
  11. ValueChanged<String>? onSubmitted,
  12. int? maxLines,
  13. int? minLines,
  14. TextInputType? keyboardType,
  15. bool? autofocus,
  16. bool obscureText = false,
  17. bool readOnly = false,
  18. bool forceLine = true,
  19. ToolbarOptions toolbarOptions = const ToolbarOptions(copy: true, cut: true, paste: true, selectAll: true),
  20. bool autocorrect = true,
  21. SmartDashesType? smartDashesType,
  22. SmartQuotesType? smartQuotesType,
  23. bool enableSuggestions = true,
  24. StrutStyle? strutStyle,
  25. TextAlign textAlign = TextAlign.start,
  26. TextDirection? textDirection,
  27. TextCapitalization textCapitalization = TextCapitalization.none,
  28. Locale? locale,
  29. double? textScaleFactor,
  30. bool expands = false,
  31. Color? selectionColor,
  32. TextSelectionControls? selectionControls,
  33. TextInputAction? textInputAction,
  34. VoidCallback? onEditingComplete,
  35. SelectionChangedCallback? onSelectionChanged,
  36. VoidCallback? onSelectionHandleTapped,
  37. List<TextInputFormatter>? inputFormatters,
  38. double cursorWidth = 2.0,
  39. Radius? cursorRadius,
  40. bool cursorOpacityAnimates = false,
  41. Offset? cursorOffset,
  42. bool paintCursorAboveText = false,
  43. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  44. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  45. Brightness keyboardAppearance = Brightness.light,
  46. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  47. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  48. ScrollController? scrollController,
  49. ScrollPhysics? scrollPhysics,
  50. bool? showCursor,
  51. bool showSelectionHandles = false,
  52. bool rendererIgnoresPointer = true,
  53. Color backgroundCursorColor = CupertinoColors.inactiveGray,
  54. bool enableInteractiveSelection = true,
  55. Color? autocorrectionTextRectColor,
  56. String obscuringCharacter = '•',
  57. AppPrivateCommandCallback? onAppPrivateCommand,
  58. MouseCursor? mouseCursor,
  59. Iterable<String>? autofillHints,
  60. String? restorationId,
  61. double? cursorHeight,
})

Implementation

DetectableEditableText({
  Key? key,
  FocusNode? focusNode,
  required TextEditingController controller,
  required TextStyle basicStyle,
  required this.detectedStyle,
  required this.detectionRegExp,
  required Color cursorColor,
  required this.onDetectionTyped,
  required this.onDetectionFinished,
  ValueChanged<String>? onChanged,
  ValueChanged<String>? onSubmitted,
  int? maxLines,
  int? minLines,
  TextInputType? keyboardType,
  bool? autofocus,
  bool obscureText = false,
  bool readOnly = false,
  bool forceLine = true,
  ToolbarOptions toolbarOptions = const ToolbarOptions(
    copy: true,
    cut: true,
    paste: true,
    selectAll: true,
  ),
  bool autocorrect = true,
  SmartDashesType? smartDashesType,
  SmartQuotesType? smartQuotesType,
  bool enableSuggestions = true,
  StrutStyle? strutStyle,
  TextAlign textAlign = TextAlign.start,
  TextDirection? textDirection,
  TextCapitalization textCapitalization = TextCapitalization.none,
  Locale? locale,
  double? textScaleFactor,
  bool expands = false,
  Color? selectionColor,
  TextSelectionControls? selectionControls,
  TextInputAction? textInputAction,
  VoidCallback? onEditingComplete,
  SelectionChangedCallback? onSelectionChanged,
  VoidCallback? onSelectionHandleTapped,
  List<TextInputFormatter>? inputFormatters,
  double cursorWidth = 2.0,
  Radius? cursorRadius,
  bool cursorOpacityAnimates = false,
  Offset? cursorOffset,
  bool paintCursorAboveText = false,
  BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  Brightness keyboardAppearance = Brightness.light,
  EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  ScrollController? scrollController,
  ScrollPhysics? scrollPhysics,
  bool? showCursor,
  bool showSelectionHandles = false,
  bool rendererIgnoresPointer = true,
  Color backgroundCursorColor = CupertinoColors.inactiveGray,
  bool enableInteractiveSelection = true,
  Color? autocorrectionTextRectColor,
  String obscuringCharacter = '•',
  AppPrivateCommandCallback? onAppPrivateCommand,
  MouseCursor? mouseCursor,
  Iterable<String>? autofillHints,
  String? restorationId,
  double? cursorHeight,
}) : super(
        key: key,
        focusNode: (focusNode) ?? FocusNode(),
        controller: controller,
        cursorColor: cursorColor,
        style: basicStyle,
        keyboardType: (keyboardType) ?? TextInputType.text,
        autofocus: (autofocus) ?? false,
        onChanged: onChanged,
        onSubmitted: onSubmitted,
        backgroundCursorColor: backgroundCursorColor,
        maxLines: maxLines,
        minLines: minLines,
        obscureText: obscureText,
        readOnly: readOnly,
        forceLine: forceLine,
        toolbarOptions: toolbarOptions,
        autocorrect: autocorrect,
        smartDashesType: smartDashesType,
        smartQuotesType: smartQuotesType,
        enableSuggestions: enableSuggestions,
        strutStyle: strutStyle,
        textAlign: textAlign,
        textDirection: textDirection,
        textCapitalization: textCapitalization,
        locale: locale,
        textScaleFactor: textScaleFactor,
        expands: expands,
        selectionColor: selectionColor,
        selectionControls: selectionControls,
        textInputAction: textInputAction,
        onEditingComplete: onEditingComplete,
        onSelectionChanged: onSelectionChanged,
        onSelectionHandleTapped: onSelectionHandleTapped,
        inputFormatters: inputFormatters,
        cursorWidth: cursorWidth,
        cursorRadius: cursorRadius,
        cursorOpacityAnimates: cursorOpacityAnimates,
        cursorOffset: cursorOffset,
        paintCursorAboveText: paintCursorAboveText,
        selectionHeightStyle: selectionHeightStyle,
        selectionWidthStyle: selectionWidthStyle,
        keyboardAppearance: keyboardAppearance,
        scrollPadding: scrollPadding,
        dragStartBehavior: dragStartBehavior,
        scrollController: scrollController,
        scrollPhysics: scrollPhysics,
        showCursor: showCursor,
        showSelectionHandles: showSelectionHandles,
        rendererIgnoresPointer: rendererIgnoresPointer,
        enableInteractiveSelection: enableInteractiveSelection,
        autocorrectionTextRectColor: autocorrectionTextRectColor,
        obscuringCharacter: obscuringCharacter,
        onAppPrivateCommand: onAppPrivateCommand,
        mouseCursor: mouseCursor,
        autofillHints: autofillHints,
        restorationId: restorationId,
        cursorHeight: cursorHeight,
      );