Native UIAlertController alerts, action sheets and prompts.
Pass a BuildContext to get the Material equivalent on other platforms;
without one these return null there.
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
-
actionSheet(
{String? title, String? message, List< NativeItem> actions = const [], BuildContext? context}) → Future<String?> -
Shows a native action sheet. See alert for
actionsand the result. Falls back to a Material bottom sheet when given acontext. -
alert(
{String? title, String? message, List< NativeItem> actions = const [], BuildContext? context}) → Future<String?> -
Shows a native alert and returns the id of the tapped action
(
NativeItem.id, or its title). -
prompt(
{String? title, String? message, String? placeholder, String? initialValue, bool obscureText = false, String confirmLabel = 'OK', String cancelLabel = 'Cancel', BuildContext? context}) → Future< String?> -
Shows an alert with a text field and returns the entered text, or
nullwhen cancelled.