CPAlertTemplate class
A template object that displays a modal alert.
Constructors
-
CPAlertTemplate({required List<
String> titleVariants, required List<CPAlertAction> actions, dynamic onPresent(bool completed)?}) - Creates CPAlertTemplate
Properties
-
actions
→ List<
CPAlertAction> -
The array of actions as CPAlertAction will be available on the alert.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onPresent → dynamic Function(bool completed)?
-
Fired when the alert presented to CarPlay. With this callback function, it can be
determined whether an error was encountered while presenting, or if it was successfully opened,
with the bool completed data in it.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
titleVariants
→ List<
String> -
The array of title variants.
When the system displays the alert, it selects the title that best fits
the available screen space, so arrange the titles from most to least preferred
when creating an alert template. Also, localize each title for display to the user,
and be sure to include at least one title in the array.
final
- uniqueId → String
-
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited