UiSpec class
A screen described as JSON, and the state it operates on.
This is a deliberately tiny vocabulary. It exists to find out how well a language model can describe a working interface, not to be a UI framework — so every node type here is one a model can hold in its head, and anything outside the vocabulary is a ProtocolException rather than a guess.
Constructors
-
UiSpec({required UiNode root, Map<
String, String> state = const {}, String? title}) -
Creates a spec.
const
- UiSpec.fromJson(Object? json)
-
Parses a decoded JSON map. Throws ProtocolException on anything it does
not recognise — a generated interface that is half-understood is worse
than one that refuses to render.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- root → UiNode
-
The widget tree.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ Map<
String, String> -
Initial values for anything the tree binds to or an action mutates.
final
- title → String?
-
Optional screen title.
final
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