ModularCustomizableDropdown.displayOnTap constructor

ModularCustomizableDropdown.displayOnTap({
  1. required dynamic onValueSelect(
    1. DropdownValue selectedValue
    ),
  2. required List<DropdownValue> 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,
  9. @visibleForTesting Key? overlayEntryKey,
  10. @visibleForTesting Key? offStageWidgetKey,
  11. @visibleForTesting Key? listviewKey,
  12. @visibleForTesting List<Key>? rowKeys,
})

Automatically displays the dropdown when the target is clicked

Implementation

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