Muk alert is a type of alert that shows in the center of the screen. Muk alert can have a title, a description, and a maximum of four buttons for users to click. You configure the colors in MukAppTheme. It follows the platform type from MukAppData.
For details on how to show the Muk alert, please refer to the code below.
C#
using Muk;
// Show Alert
public void ShowAlert()
{
AlertButton[] buttons = {
new AlertButton("OK", () => {print("OK clicked");}),
new AlertButton("Cancel", iOSColor.systemRed_Light, () => {print("Cancel clicked");}),
};
MukAlertManager.Instance.SetTitle("This is demo alert");
MukAlertManager.Instance.SetMessage("This is the body of the demo alert.");
// MukAlertManager.Instance.IsDismissByBackground(false);
MukAlertManager.Instance.SetButtons(buttons);
// MukAlertManager.Instance.SetButton(buttons[0]); //If you just want to show only button.
MukAlertManager.Instance.Show();
}