AppDropDownTextField<T> constructor
const
AppDropDownTextField<T> ({
- required String itemText(
- T value
- Key? key,
- TextEditingController? controller,
- FocusNode? focusNode,
- InputDecoration? decoration({
- required bool showMenu,
- 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,
- ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onSubmitted, - AppPrivateCommandCallback? onAppPrivateCommand,
- List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- double cursorWidth = 2,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
- BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
- Brightness? keyboardAppearance,
- EdgeInsets scrollPadding = const EdgeInsets.all(20),
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool? enableInteractiveSelection,
- TextSelectionControls? selectionControls,
- GestureTapCallback? onTap,
- void onTapOutside({
- required bool showMenu,
- MouseCursor? mouseCursor,
- InputCounterWidgetBuilder? buildCounter,
- ScrollController? scrollController,
- ScrollPhysics? scrollPhysics,
- Iterable<
String> ? autofillHints, - Clip clipBehavior = Clip.hardEdge,
- String? restorationId,
- bool enableIMEPersonalizedLearning = true,
- EditableTextContextMenuBuilder? contextMenuBuilder,
- SpellCheckConfiguration? spellCheckConfiguration,
- TextMagnifierConfiguration? magnifierConfiguration,
- UndoHistoryController? undoController,
- bool canRequestFocus = true,
- ContentInsertionConfiguration? contentInsertionConfiguration,
- bool? cursorOpacityAnimates,
- DropDownButtonPosition position = DropDownButtonPosition.bottomCenter,
- String? initValue()?,
- Widget customField({
- required Widget contextMenuBuilder()?,
- required TextEditingController controller,
- required FocusNode focusNode,
- required String groupId,
- required void onTapOutside({
- required bool showMenu,
- required VoidCallback showHideMenuEvent,
- required bool showMenu,
- void onMenuChanged({
- required bool showMenu,
- Widget suffixIcon({
- required bool showMenu,
- T? selectItem,
Implementation
const AppDropDownTextField({
required this.itemText,
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,
this.selectItem,
}) : super(key: key);