ModularCustomizableDropdown.displayOnTap constructor

ModularCustomizableDropdown.displayOnTap({
  1. required dynamic onValueSelect(
    1. String selectedValue
    ),
  2. required List<String> allDropdownValues,
  3. required Widget target,
  4. dynamic onDropdownVisible(
    1. bool
    )?,
  5. bool barrierDismissible = true,
  6. DropdownStyle style = const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
  7. bool collapseOnSelect = true,
  8. Key? key,
})

Automatically displays the dropdown when the target is clicked

Implementation

factory ModularCustomizableDropdown.displayOnTap({
  required Function(String selectedValue) onValueSelect,
  required List<String> allDropdownValues,
  required Widget target,
  Function(bool)? onDropdownVisible,
  bool barrierDismissible = true,
  DropdownStyle style =
      const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
  bool collapseOnSelect = true,
  Key? key,
}) {
  return ModularCustomizableDropdown(
    reactMode: ReactMode.tapReact,
    onValueSelect: onValueSelect,
    collapseOnSelect: collapseOnSelect,
    allDropdownValues: allDropdownValues,
    tapReactParams: TapReactParams(target: target),
    dropdownStyle: style,
    onDropdownVisibilityChange: onDropdownVisible,
    barrierDismissible: barrierDismissible,
  );
}