AppDropDownTextField<T> constructor

const AppDropDownTextField<T>({
  1. Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. InputDecoration? decoration({
    1. required bool showMenu,
    })?,
  5. TextInputType? keyboardType,
  6. TextInputAction? textInputAction,
  7. TextCapitalization textCapitalization = TextCapitalization.none,
  8. TextStyle? style,
  9. StrutStyle? strutStyle,
  10. TextAlign textAlign = TextAlign.start,
  11. TextAlignVertical? textAlignVertical,
  12. TextDirection? textDirection,
  13. bool readOnly = false,
  14. bool? showCursor,
  15. bool autofocus = false,
  16. String obscuringCharacter = '•',
  17. bool obscureText = false,
  18. bool autocorrect = true,
  19. SmartDashesType? smartDashesType,
  20. SmartQuotesType? smartQuotesType,
  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. double cursorWidth = 2,
  34. double? cursorHeight,
  35. Radius? cursorRadius,
  36. Color? cursorColor,
  37. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  38. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  39. Brightness? keyboardAppearance,
  40. EdgeInsets scrollPadding = const EdgeInsets.all(20),
  41. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  42. bool? enableInteractiveSelection,
  43. TextSelectionControls? selectionControls,
  44. GestureTapCallback? onTap,
  45. void onTapOutside({
    1. required bool showMenu,
    })?,
  46. MouseCursor? mouseCursor,
  47. InputCounterWidgetBuilder? buildCounter,
  48. ScrollController? scrollController,
  49. ScrollPhysics? scrollPhysics,
  50. Iterable<String>? autofillHints,
  51. Clip clipBehavior = Clip.hardEdge,
  52. String? restorationId,
  53. bool enableIMEPersonalizedLearning = true,
  54. EditableTextContextMenuBuilder? contextMenuBuilder,
  55. SpellCheckConfiguration? spellCheckConfiguration,
  56. TextMagnifierConfiguration? magnifierConfiguration,
  57. UndoHistoryController? undoController,
  58. bool canRequestFocus = true,
  59. ContentInsertionConfiguration? contentInsertionConfiguration,
  60. bool? cursorOpacityAnimates,
  61. List<Widget> menuItems(
    1. VoidCallback hideMenu
    )?,
  62. double menuVerticalSpacing = 0,
  63. Color? menuBackgroundColor,
  64. DropDownButtonPosition position = DropDownButtonPosition.bottomCenter,
  65. double menuItemsSpacing = 0,
  66. Clip menuClipBehavior = Clip.hardEdge,
  67. EdgeInsets? menuPadding,
  68. BorderRadius? menuBorderRadius,
  69. Widget menuList({
    1. required double buttonWidth,
    2. required VoidCallback hideMenu,
    })?,
  70. Key? menuKey,
  71. String? initValue()?,
  72. Widget customField({
    1. required Widget contextMenuBuilder(
      1. BuildContext,
      2. EditableTextState
      )?,
    2. required TextEditingController controller,
    3. required FocusNode focusNode,
    4. required String groupId,
    5. required void onTapOutside({
      1. required bool showMenu,
      })?,
    6. required VoidCallback showHideMenuEvent,
    7. required bool showMenu,
    })?,
  73. void onMenuChanged({
    1. required bool showMenu,
    })?,
  74. Widget suffixIcon({
    1. required bool showMenu,
    })?,
})

Implementation

const AppDropDownTextField({
  Key? key,
  // TextField parameters
  this.controller,
  this.focusNode,
  this.decoration,
  this.keyboardType,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.style,
  this.strutStyle,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.textDirection,
  this.readOnly = false,
  this.showCursor,
  this.autofocus = false,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  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.cursorWidth = 2,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.selectionHeightStyle = ui.BoxHeightStyle.tight,
  this.selectionWidthStyle = ui.BoxWidthStyle.tight,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20),
  this.dragStartBehavior = DragStartBehavior.start,
  this.enableInteractiveSelection,
  this.selectionControls,
  this.onTap,
  this.onTapOutside,
  this.mouseCursor,
  this.buildCounter,
  this.scrollController,
  this.scrollPhysics,
  this.autofillHints,
  this.clipBehavior = Clip.hardEdge,
  this.restorationId,
  this.enableIMEPersonalizedLearning = true,
  this.contextMenuBuilder,
  this.spellCheckConfiguration,
  this.magnifierConfiguration,
  this.undoController,
  this.canRequestFocus = true,
  this.contentInsertionConfiguration,
  this.cursorOpacityAnimates,

  // BasicDropDownButton parameters
  this.menuItems,
  this.menuVerticalSpacing = 0,
  this.menuBackgroundColor,
  this.position = DropDownButtonPosition.bottomCenter,
  this.menuItemsSpacing = 0,
  this.menuClipBehavior = Clip.hardEdge,
  this.menuPadding,
  this.menuBorderRadius,
  this.menuList,
  this.menuKey,
  this.initValue,
  this.customField,
  this.onMenuChanged,
  this.suffixIcon,
}) : super(key: key);