AlertControllerObject class

Represents all data in an alert controller.

Constructors

AlertControllerObject.multipleActions({required VoidCallback onCancellation, required String alertTitle, required String alertBody, required IconData alertIcon, required List<AlertControllerAction>? actions, bool? canUserExit = true})
A constructor that takes multiple items through the actions list, and otherwise throws an error
AlertControllerObject.singleAction({required VoidCallback onCancellation, required String alertTitle, required String alertBody, required IconData alertIcon, required List<AlertControllerAction>? actions, bool? canUserExit = true})
A constructor that takes one item through the actions list, and otherwise throws an error
AlertControllerObject.textField({required VoidCallback onCancellation, required String alertTitle, required String alertBody, required IconData alertIcon, required TextEditingController? controller, required String? hintText, required VoidCallback? onFinish, bool? canUserExit = true})

Properties

actions List<AlertControllerAction>?
The actions someone can take on the alert controller.
getter/setter pair
alertBody String
Description & body of alert controller
final
alertIcon IconData
Icon for the alert controller badge
final
alertTitle String
Title of the alert controller
final
canUserExit bool?
Whether or not a user should be shown an exit button on an Alert Controller. Use this to 'force' users into picking an option, but use it very sparingly and only when neccessary.
getter/setter pair
controller TextEditingController?
If using a TextFieldAlertControllerComponent, this is the controller that will hold the text value.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hintText String?
If using a TextFieldAlertControllerComponent, this is the hint text for the user to know what to type in.
getter/setter pair
onCancellation VoidCallback
What to do when the alert controller is cancelled
final
onFinish VoidCallback?
If using a TextFieldAlertControllerComponent, this is code to run after the user finishes typing.
getter/setter pair
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