TextFieldB function

TextField TextFieldB(
  1. Binder<String> binder, {
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. UndoHistoryController? undoController,
  5. InputDecoration? decoration = const InputDecoration(),
  6. TextInputType? keyboardType,
  7. TextInputAction? textInputAction,
  8. TextCapitalization textCapitalization = TextCapitalization.none,
  9. TextStyle? style,
  10. StrutStyle? strutStyle,
  11. TextAlign textAlign = TextAlign.start,
  12. TextAlignVertical? textAlignVertical,
  13. TextDirection? textDirection,
  14. bool readOnly = false,
  15. bool? showCursor,
  16. bool autofocus = false,
  17. String obscuringCharacter = '•',
  18. bool obscureText = false,
  19. bool autocorrect = true,
  20. SmartDashesType? smartDashesType,
  21. SmartQuotesType? smartQuotesType,
  22. bool enableSuggestions = true,
  23. int? maxLines = 1,
  24. int? minLines,
  25. bool expands = false,
  26. int? maxLength,
  27. MaxLengthEnforcement? maxLengthEnforcement,
  28. void onChanged(
    1. String
    )?,
  29. void onEditingComplete()?,
  30. void onSubmitted(
    1. String
    )?,
  31. void onAppPrivateCommand(
    1. String,
    2. Map<String, dynamic>
    )?,
  32. List<TextInputFormatter>? inputFormatters,
  33. bool? enabled,
  34. double cursorWidth = 2.0,
  35. double? cursorHeight,
  36. Radius? cursorRadius,
  37. bool? cursorOpacityAnimates,
  38. Color? cursorColor,
  39. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  40. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  41. Brightness? keyboardAppearance,
  42. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  43. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  44. bool? enableInteractiveSelection,
  45. TextSelectionControls? selectionControls,
  46. void onTap()?,
  47. void onTapOutside(
    1. PointerDownEvent
    )?,
  48. MouseCursor? mouseCursor,
  49. Widget? buildCounter(
    1. BuildContext, {
    2. required int currentLength,
    3. required bool isFocused,
    4. required int? maxLength,
    })?,
  50. ScrollController? scrollController,
  51. ScrollPhysics? scrollPhysics,
  52. Iterable<String>? autofillHints = const <String>[],
  53. ContentInsertionConfiguration? contentInsertionConfiguration,
  54. Clip clipBehavior = Clip.hardEdge,
  55. String? restorationId,
  56. bool enableIMEPersonalizedLearning = true,
  57. Widget contextMenuBuilder(
    1. BuildContext,
    2. EditableTextState
    )? = _defaultContextMenuBuilder,
  58. bool canRequestFocus = true,
  59. SpellCheckConfiguration? spellCheckConfiguration,
  60. TextMagnifierConfiguration? magnifierConfiguration,
})

Implementation

TextField TextFieldB(
  Binder<String> binder, {
  TextEditingController? controller,
  FocusNode? focusNode,
  UndoHistoryController? undoController,
  InputDecoration? decoration = const InputDecoration(),
  TextInputType? keyboardType,
  TextInputAction? textInputAction,
  TextCapitalization textCapitalization = TextCapitalization.none,
  TextStyle? style,
  StrutStyle? strutStyle,
  TextAlign textAlign = TextAlign.start,
  TextAlignVertical? textAlignVertical,
  TextDirection? textDirection,
  bool readOnly = false,
  bool? showCursor,
  bool autofocus = false,
  String obscuringCharacter = '•',
  bool obscureText = false,
  bool autocorrect = true,
  SmartDashesType? smartDashesType,
  SmartQuotesType? smartQuotesType,
  bool enableSuggestions = true,
  int? maxLines = 1,
  int? minLines,
  bool expands = false,
  int? maxLength,
  MaxLengthEnforcement? maxLengthEnforcement,
  void Function(String)? onChanged,
  void Function()? onEditingComplete,
  void Function(String)? onSubmitted,
  void Function(String, Map<String, dynamic>)? onAppPrivateCommand,
  List<TextInputFormatter>? inputFormatters,
  bool? enabled,
  double cursorWidth = 2.0,
  double? cursorHeight,
  Radius? cursorRadius,
  bool? cursorOpacityAnimates,
  Color? cursorColor,
  BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  Brightness? keyboardAppearance,
  EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  bool? enableInteractiveSelection,
  TextSelectionControls? selectionControls,
  void Function()? onTap,
  void Function(PointerDownEvent)? onTapOutside,
  MouseCursor? mouseCursor,
  Widget? Function(BuildContext, {required int currentLength, required bool isFocused, required int? maxLength})? buildCounter,
  ScrollController? scrollController,
  ScrollPhysics? scrollPhysics,
  Iterable<String>? autofillHints = const <String>[],
  ContentInsertionConfiguration? contentInsertionConfiguration,
  Clip clipBehavior = Clip.hardEdge,
  String? restorationId,
  bool enableIMEPersonalizedLearning = true,
  Widget Function(BuildContext, EditableTextState)? contextMenuBuilder = _defaultContextMenuBuilder,
  bool canRequestFocus = true,
  SpellCheckConfiguration? spellCheckConfiguration,
  TextMagnifierConfiguration? magnifierConfiguration,
}) {
  late TextEditingController con;
  if (controller != null) {
    controller.text = binder.value;
    con = controller;
  } else {
    con = TextEditingController(text: binder.value);
  }

  return TextField(
    controller: con,
    onChanged: (s) {
      binder.value = s;
      binder.fireChanged();
    },
    focusNode: focusNode,
    undoController: undoController,
    decoration: decoration,
    keyboardType: keyboardType,
    textInputAction: textInputAction,
    textCapitalization: textCapitalization,
    style: style,
    strutStyle: strutStyle,
    textAlign: textAlign,
    textAlignVertical: textAlignVertical,
    textDirection: textDirection,
    readOnly: readOnly,
    showCursor: showCursor,
    autofocus: autofocus,
    obscuringCharacter: obscuringCharacter,
    obscureText: obscureText,
    autocorrect: autocorrect,
    smartDashesType: smartDashesType,
    smartQuotesType: smartQuotesType,
    enableSuggestions: enableSuggestions,
    maxLines: maxLines,
    minLines: minLines,
    expands: expands,
    maxLength: maxLength,
    maxLengthEnforcement: maxLengthEnforcement,
    onEditingComplete: onEditingComplete,
    onSubmitted: onSubmitted,
    onAppPrivateCommand: onAppPrivateCommand,
    inputFormatters: inputFormatters,
    enabled: enabled,
    cursorWidth: cursorWidth,
    selectionHeightStyle: selectionHeightStyle,
    selectionWidthStyle: selectionWidthStyle,
    keyboardAppearance: keyboardAppearance,
    scrollPadding: scrollPadding,
    dragStartBehavior: dragStartBehavior,
    enableInteractiveSelection: enableInteractiveSelection,
    selectionControls: selectionControls,
    onTap: onTap,
    onTapOutside: onTapOutside,
    mouseCursor: mouseCursor,
    buildCounter: buildCounter,
    scrollController: scrollController,
    scrollPhysics: scrollPhysics,
    autofillHints: autofillHints,
    contentInsertionConfiguration: contentInsertionConfiguration,
    clipBehavior: clipBehavior,
    restorationId: restorationId,
    enableIMEPersonalizedLearning: enableIMEPersonalizedLearning,
    contextMenuBuilder: contextMenuBuilder,
    canRequestFocus: canRequestFocus,
    spellCheckConfiguration: spellCheckConfiguration,
    magnifierConfiguration: magnifierConfiguration,
  );
}