launchSettings function

void launchSettings(
  1. LaunchSettingsOptions options
)

Toggles the visibility state of the settings modal.

The options parameter should include:

  • updateIsSettingsModalVisible: A function to update the visibility state of the settings modal.
  • isSettingsModalVisible: The current visibility state of the settings modal.

Example usage:

launchSettings(
  LaunchSettingsOptions(
    updateIsSettingsModalVisible: (visible) => setModalVisible(visible),
    isSettingsModalVisible: false,
  ),
);

Implementation

void launchSettings(LaunchSettingsOptions options) {
  // Toggle the visibility of the settings modal
  options.updateIsSettingsModalVisible(!options.isSettingsModalVisible);
}