ModularCustomizableDropdown.displayOnCallback constructor
ModularCustomizableDropdown.displayOnCallback({
- required dynamic onValueSelect(
- DropdownValue selectedValue
- required List<
DropdownValue> allDropdownValues, - required Widget targetBuilder(
- void toggleDropdown(
- bool toggleState
- void toggleDropdown(
- required bool collapseOnSelect,
- bool barrierDismissible = true,
- DropdownStyle style = const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
- Key? key,
- @visibleForTesting Key? listviewKey,
- @visibleForTesting Key? overlayEntryKey,
- @visibleForTesting Key? offStageWidgetKey,
- @visibleForTesting List<
Key> ? rowKeys,
Expose a toggle callback in the target builder method.
Implementation
factory ModularCustomizableDropdown.displayOnCallback({
required Function(DropdownValue selectedValue) onValueSelect,
required List<DropdownValue> allDropdownValues,
required Widget Function(void Function(bool toggleState) toggleDropdown)
targetBuilder,
required bool collapseOnSelect,
bool barrierDismissible = true,
DropdownStyle style =
const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
Key? key,
@visibleForTesting Key? listviewKey,
@visibleForTesting Key? overlayEntryKey,
@visibleForTesting Key? offStageWidgetKey,
@visibleForTesting List<Key>? rowKeys,
}) {
return ModularCustomizableDropdown(
listviewKey: listviewKey,
offStageWidgetKey: offStageWidgetKey,
overlayEntryKey: overlayEntryKey,
rowKeys: rowKeys,
key: key,
reactMode: ReactMode.callbackReact,
onValueSelect: onValueSelect,
allDropdownValues: allDropdownValues,
collapseOnSelect: collapseOnSelect,
callbackReactParams: CallbackReactParams(targetBuilder: targetBuilder),
dropdownStyle: style,
barrierDismissible: barrierDismissible,
);
}