pub fn ask<R: Runtime>(
parent_window: Option<&Window<R>>,
title: impl AsRef<str>,
message: impl AsRef<str>
) -> bool
Available on crate feature
dialog
only.Expand description
Displays a dialog with a message and an optional title with a “yes” and a “no” button and wait for it to be closed.
This is a blocking operation, and should NOT be used when running on the main thread context.
Examples
use tauri::api::dialog::blocking::ask;
let answer = ask(Some(&window), "Tauri", "Is Tauri awesome?");
// do something with `answer`