StacDialogAction class

Core model for the "showDialog" action.

Presents a dialog built from STAC JSON. Defaults for dismissibility and safe area are applied in the parser, not in this model.

Dart example:

const StacDialogAction(
  assetPath: 'assets/dialog.json',
);

JSON example:

{
  "actionType": "showDialog",
  "widget": {"type": "text", "data": {"text": "Title"}}
}
Inheritance
Annotations
  • @JsonSerializable()

Constructors

StacDialogAction.new({Map<String, dynamic>? widget, StacNetworkRequest? request, String? assetPath, bool? barrierDismissible, String? barrierColor, String? barrierLabel, bool? useSafeArea, StacTraversalEdgeBehavior? traversalEdgeBehavior})
Creates a StacDialogAction that shows a dialog.
const
StacDialogAction.fromJson(Map<String, dynamic> json)
Creates a StacDialogAction from JSON.
factory

Properties

actionType String
Unique action type string used for routing.
no setteroverride
assetPath String?
Asset path to dialog widget JSON.
final
barrierColor String?
Barrier color hex string.
final
barrierDismissible bool?
Whether tapping the barrier dismisses the dialog.
final
barrierLabel String?
Semantics label for barrier.
final
hashCode int
The hash code for this object.
no setterinherited
jsonData Map<String, dynamic>?
The raw JSON data associated with this action.
finalinherited
request StacNetworkRequest?
Network request to fetch dialog widget JSON.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
traversalEdgeBehavior StacTraversalEdgeBehavior?
Traversal behavior for focus traversal at edges.
final
useSafeArea bool?
Whether to use safe area for the dialog.
final
widget Map<String, dynamic>?
Dialog content widget JSON.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this action to JSON.
override
toString() String
A string representation of this object.
inherited

Operators

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