LexicalCommand<P> class final

A dispatchable, typed command.

Identity, not the label, distinguishes commands: two commands with the same label are different commands. The label exists for debugging.

The type parameter gives genuinely better payload typing than upstream's, because the handler signature is checked at the registration site. Use it — a dynamic payload throws away the main advantage of the port.

Constructors

LexicalCommand(String label)
Creates a command labelled label carrying a payload of type P.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
label String
Human-readable name, for debugging only.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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