ModularCustomizableDropdown.displayOnFocus constructor
ModularCustomizableDropdown.displayOnFocus({
- required dynamic onValueSelect(
- String selectedValue
- required List<
String> allDropdownValues, - required Widget targetBuilder(
- FocusNode focusNode,
- TextEditingController textController
- required TextEditingController textController,
- required FocusNode focusNode,
- bool setTextToControllerOnSelect = true,
- bool collapseOnSelect = true,
- bool barrierDismissible = true,
- dynamic onDropdownVisible()?,
- DropdownStyle style = const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
- Key? key,
Same as displayOnTap, but also triggers dropdown when the target is in focus
Implementation
factory ModularCustomizableDropdown.displayOnFocus({
required Function(String selectedValue) onValueSelect,
required List<String> allDropdownValues,
required Widget Function(
FocusNode focusNode, TextEditingController textController)
targetBuilder,
required TextEditingController textController,
required FocusNode focusNode,
bool setTextToControllerOnSelect = true,
bool collapseOnSelect = true,
bool barrierDismissible = true,
Function(bool)? onDropdownVisible,
DropdownStyle style =
const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
Key? key,
}) {
return ModularCustomizableDropdown(
reactMode: ReactMode.focusReact,
onValueSelect: onValueSelect,
allDropdownValues: allDropdownValues,
collapseOnSelect: collapseOnSelect,
focusReactParams: FocusReactParams(
textController: textController,
focusNode: focusNode,
setTextToControllerOnSelect: setTextToControllerOnSelect,
targetBuilder: targetBuilder),
dropdownStyle: style,
onDropdownVisibilityChange: onDropdownVisible,
barrierDismissible: barrierDismissible,
);
}