launchConfirmExit function

void launchConfirmExit(
  1. LaunchConfirmExitOptions options
)

Toggles the visibility of the confirmation exit modal.

This function calls updateIsConfirmExitModalVisible with the negated value of isConfirmExitModalVisible to toggle the modal's visibility.

Example:

final options = LaunchConfirmExitOptions(
  updateIsConfirmExitModalVisible: (bool isVisible) {
    // Update visibility state here
  },
  isConfirmExitModalVisible: false,
);

launchConfirmExit(options);
// This will open the modal if it's currently closed, or close it if it's open.

Implementation

void launchConfirmExit(LaunchConfirmExitOptions options) {
  options.updateIsConfirmExitModalVisible(!options.isConfirmExitModalVisible);
}