AutoLangField constructor

AutoLangField({
  1. Key? key,
  2. required List<LanguageCode> supportedLanguages,
  3. PropertiesPerLang? textPropertiesPerLanguage,
  4. LangCallback? onLanguageDetected,
  5. TextEditingController? controller,
  6. InputDecoration? decoration = const InputDecoration(),
  7. Object groupId = EditableText,
  8. FocusNode? focusNode,
  9. UndoHistoryController? undoController,
  10. TextInputAction? textInputAction,
  11. TextCapitalization textCapitalization = TextCapitalization.none,
  12. StrutStyle? strutStyle,
  13. TextAlignVertical? textAlignVertical,
  14. TextDirection? textDirection,
  15. bool readOnly = false,
  16. bool? showCursor,
  17. bool autofocus = false,
  18. String obscuringCharacter = '•',
  19. bool obscureText = false,
  20. bool autocorrect = true,
  21. bool enableSuggestions = true,
  22. int? maxLines = 1,
  23. int? minLines,
  24. bool expands = false,
  25. int? maxLength,
  26. MaxLengthEnforcement? maxLengthEnforcement,
  27. ValueChanged<String>? onChanged,
  28. VoidCallback? onEditingComplete,
  29. ValueChanged<String>? onSubmitted,
  30. AppPrivateCommandCallback? onAppPrivateCommand,
  31. List<TextInputFormatter>? inputFormatters,
  32. bool? enabled,
  33. bool? ignorePointers,
  34. double cursorWidth = 2.0,
  35. double? cursorHeight,
  36. Radius? cursorRadius,
  37. bool? cursorOpacityAnimates,
  38. Color? cursorColor,
  39. Color? cursorErrorColor,
  40. Brightness? keyboardAppearance,
  41. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  42. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  43. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  44. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  45. TextSelectionControls? selectionControls,
  46. GestureTapCallback? onTap,
  47. bool onTapAlwaysCalled = false,
  48. TapRegionCallback? onTapOutside,
  49. MouseCursor? mouseCursor,
  50. InputCounterWidgetBuilder? buildCounter,
  51. ScrollController? scrollController,
  52. ScrollPhysics? scrollPhysics,
  53. Iterable<String>? autofillHints = const <String>[],
  54. ContentInsertionConfiguration? contentInsertionConfiguration,
  55. Clip clipBehavior = Clip.hardEdge,
  56. String? restorationId,
  57. bool scribbleEnabled = true,
  58. bool enableIMEPersonalizedLearning = true,
  59. bool canRequestFocus = true,
  60. SpellCheckConfiguration? spellCheckConfiguration,
  61. TextMagnifierConfiguration? magnifierConfiguration,
  62. TextInputType keyboardType = TextInputType.text,
  63. EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder,
  64. bool enableInteractiveSelection = true,
  65. WidgetStatesController? statesController,
  66. SmartDashesType? smartDashesType,
  67. SmartQuotesType? smartQuotesType,
})

Implementation

AutoLangField({
  super.key,
  required this.supportedLanguages,
  this.textPropertiesPerLanguage,
  this.onLanguageDetected,
  this.controller,
  // Other TextField Properties
  this.decoration = const InputDecoration(),
  this.groupId = EditableText,
  this.focusNode,
  this.undoController,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.strutStyle,
  this.textAlignVertical,
  this.textDirection,
  this.readOnly = false,
  this.showCursor,
  this.autofocus = false,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = true,
  this.enableSuggestions = true,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.maxLength,
  this.maxLengthEnforcement,
  this.onChanged,
  this.onEditingComplete,
  this.onSubmitted,
  this.onAppPrivateCommand,
  this.inputFormatters,
  this.enabled,
  this.ignorePointers,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorOpacityAnimates,
  this.cursorColor,
  this.cursorErrorColor,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.dragStartBehavior = DragStartBehavior.start,
  this.selectionHeightStyle = BoxHeightStyle.tight,
  this.selectionWidthStyle = BoxWidthStyle.tight,
  this.selectionControls,
  this.onTap,
  this.onTapAlwaysCalled = false,
  this.onTapOutside,
  this.mouseCursor,
  this.buildCounter,
  this.scrollController,
  this.scrollPhysics,
  this.autofillHints = const <String>[],
  this.contentInsertionConfiguration,
  this.clipBehavior = Clip.hardEdge,
  this.restorationId,
  this.scribbleEnabled = true,
  this.enableIMEPersonalizedLearning = true,
  this.canRequestFocus = true,
  this.spellCheckConfiguration,
  this.magnifierConfiguration,
  this.keyboardType = TextInputType.text,
  this.contextMenuBuilder = _defaultContextMenuBuilder,
  this.enableInteractiveSelection = true,
  this.statesController,
  this.smartDashesType,
  this.smartQuotesType,
}) : assert(supportedLanguages.isNotEmpty, SUPPRTEDLANGUAGES);