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