launchMenuModal function
- LaunchMenuModalOptions options
Toggles the visibility of the menu modal.
This function calls updateIsMenuModalVisible
with the negated value of
isMenuModalVisible
to toggle the modal's visibility.
Example:
final options = LaunchMenuModalOptions(
updateIsMenuModalVisible: (isVisible) => print("Menu modal visibility: $isVisible"),
isMenuModalVisible: false,
);
launchMenuModal(options);
// This will open the modal if it's currently closed, or close it if it's open.
Implementation
void launchMenuModal(LaunchMenuModalOptions options) {
options.updateIsMenuModalVisible(!options.isMenuModalVisible);
}