BaseAlertAction class

Represents an action button in an alert (cross-platform data model)

This is the primary class to use when creating alert actions. It will be automatically converted to platform-specific implementations:

  • iOS/macOS: Native UIAlertController actions via platform channels
  • Android/Other: Material Design TextButton in AlertDialog

Constructors

BaseAlertAction({required String title, BaseAlertActionStyle style = BaseAlertActionStyle.defaultStyle, VoidCallback? onPressed})
Creates an alert action.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
onPressed → VoidCallback?
Callback when the button is tapped.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → BaseAlertActionStyle
The style of the button.
final
title → String
The title displayed on the button.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCNAlertAction() → CNAlertAction
Converts to CNAlertAction for iOS native implementation
toString() → String
A string representation of this object.
inherited

Operators

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