Skip to content
NLNuvyntra Labs

Documentation

Dialogs

IDialogs for alert / confirm / error, INotifier toast, Maui implementations, and test fakes.

Shipped surface

ViewModels depend on IDialogs and INotifier, never on Page.DisplayAlert. UseDialogs() registers MauiDialogs and MauiNotifier. Both hop to IMainThread. MauiToastPresenter draws on Window.AddOverlay and never wraps or replaces Page.Content.

APIStatus
AlertAsync, ConfirmAsync, ErrorAsyncShipped — marshalled to IMainThread
ToastAsync (INotifier)Shipped — Window.AddOverlay
IToastPresenterShipped — test seam
Prompt, action sheet, loading overlay, snackbar, bannerNot shipped
var ok = await dialogs.ConfirmAsync(
    "Delete product",
    "This cannot be undone.",
    accept: "Delete",
    cancel: "Cancel",
    cancellationToken);

if (ok)
{
    await catalog.DeleteAsync(id, cancellationToken);
    await notifier.ToastAsync("Deleted", cancellationToken: cancellationToken);
}

Tests

NullDialogs implements both interfaces as no-ops. FakeDialogs records alerts and lets the test set ConfirmResult. There is no FakeNotifier type — FakeDialogs is INotifier. Inject IToastPresenter to record toasts without a window.