state method
void
state(
- String stateId,
- String stateLabel, {
- String? description,
- List<
FieldDescriptor> fields = const [], - required PanelStateReader read,
Declares a snapshot the host can ask for.
Implementation
void state(
String stateId,
String stateLabel, {
String? description,
List<FieldDescriptor> fields = const [],
required PanelStateReader read,
}) {
_states[stateId] = (
StateDescriptor(
stateId,
stateLabel,
description: description,
fields: fields,
),
read,
);
_panels._changed();
}