GenUiSemanticNode class

One node of what a surface exposes to assistive technology, in the shape A2UI's rendering cases are written in.

A rendered surface cannot be compared between Flutter, SwiftUI, Compose and the web as pixels. It can be compared as semantics: every one of those toolkits builds a tree of roles, names, values, states and actions, and that is also the part of a rendered surface the protocol has opinions about — a Button the agent labelled Send has to arrive as something that says "Send" and can be pressed, whatever draws it.

Constructors

GenUiSemanticNode({required String role, String name = '', String value = '', Map<String, bool> state = const <String, bool>{}, List<String> actions = const <String>[]})
Creates a GenUiSemanticNode.
const
GenUiSemanticNode.fromJson(Map<String, Object?> json)
Reads back a node written by toJson.
factory

Properties

actions List<String>
What a user can do to it: tap, increase, decrease, and the rest of the platform's action names.
final
hashCode int
The hash code for this object.
no setteroverride
name String
What assistive technology announces this node as.
final
role String
What kind of thing this is: text, button, checkbox, switch, slider, text_field, image, link or group.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Map<String, bool>
checked, selected and disabled, when the node has them.
final
value String
What it currently holds, for the components that hold something.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
This node as JSON, omitting what it does not carry so that a golden file stays readable.
toString() String
A string representation of this object.
override

Operators

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