CNAlert class

Legacy CNAlert class for backward compatibility

This maintains the original API while delegating to BaseAlert for actual implementation.

Note: This still uses CNAlertAction for backward compatibility, but internally converts to BaseAlertAction.

Constructors

CNAlert()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

show({required String title, String? message, required List<CNAlertAction> actions, int? preferredActionIndex}) → Future<int?>
Shows a native alert dialog.
showConfirmation({required String title, String? message, String confirmTitle = 'Confirm', VoidCallback? onConfirm}) → Future<bool>
Shows a confirmation alert with Cancel and Confirm buttons.
showDestructiveConfirmation({required String title, String? message, required String destructiveTitle, VoidCallback? onDestroy}) → Future<bool>
Shows a destructive confirmation alert.
showInfo({required String title, String? message}) → Future<void>
Shows a simple informational alert with an OK button.