DetectableEditableText constructor
DetectableEditableText({
- Key? key,
- FocusNode? focusNode,
- required TextEditingController controller,
- required TextStyle basicStyle,
- required TextStyle detectedStyle,
- required RegExp detectionRegExp,
- required Color cursorColor,
- required ValueChanged<
String> ? onDetectionTyped, - required VoidCallback? 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,
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,
);