Controls class
Routes events emitted by control devices to the handlers bound to them.
One call binds the lot: the events that reach a handler, the handler, and any groups that switch it on and off.
TODO: Document further.
Constructors
- Controls()
Properties
-
devices
→ List<
ControlDevice> -
The devices feeding events in.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bind(
ControlHandler handler, {required Set< ControlEvent> matchers, Set<String> groups = const {}}) → Cleanup -
Answers any of
matcherswithhandler, until the returned Cleanup is called or the Node.build that bound it is gone. -
disable(
String group) → void -
Stops the handlers in
groupanswering, until enable. -
dispatch(
ControlEvent emitted) → bool -
Runs the one handler that answers
emitted, if any. -
dispose(
) → void - Stops every device, and drops every control.
-
enable(
String group) → void -
Lets the handlers in
groupanswer again. -
install(
ControlDevice device) → void -
Starts
deviceand feeds its events to dispatch, until uninstalled. -
isEnabled(
String group) → bool -
Whether
groupis enabled, which it is until disable. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstall(
ControlDevice device) → void -
Stops
deviceand drops it.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited