CatalogKnobs class
The catalog's side of a guest: the knobs a demo declares while it builds, and the two service extensions a panel reads and writes them through.
The panel runs in another process and the guest has no platform channels — there is nothing on the other end of one, the host is a few hundred lines of C. What it does have is a VM service, already connected because that is how a reload is pushed in. So the knobs travel as service extensions, which is the one bidirectional channel a plain embedder guest has.
Values do not travel as a reload. Setting one rebuilds the demo in place, which is the difference between turning a knob and recompiling: the demo keeps its state, and the answer is on screen in a frame rather than in a hundred milliseconds.
Properties
- declared → int
-
Bumped when a knob is declared, which happens while the demo builds —
so this one must never mark anything dirty. Nothing on screen depends on
it either: the demo already has the default it just asked for. It exists
so a panel can tell that the set it is showing is out of date.
no setter
- editable → EditableKnobs
-
latefinal
- entryId → String?
-
Which entry the guest is currently showing.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
revision
→ ValueNotifier<
int> -
Bumped when a value changes, so the widget providing these to the demo
has something to rebuild on.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
apply(
String name, Object? value) → bool -
applyAll(
Map< String, Object?> values) → bool -
Sets
nametovalue, or back to its default whenvalueis null. -
describe(
) → KnobReport - Every knob the last build declared, in declaration order.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerExtensions(
) → void -
Registers the extensions. Call once, before
runApp. -
resetFor(
String entryId) → void - Forgets everything the previous entry declared.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → CatalogKnobs
-
final