Mitt class

Constructors

Mitt()

Properties

all Map<Symbol, List>
get all events
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

emit(Symbol type, dynamic arg) → void
emit event by type. and pass arg as parameter when calling it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off(Symbol type, {MittEventHandler? eventHandler, MittWildcardEventHandler? wildcardHandler}) → void
remove specific handler with event type or leave null will remove all handlers if type is not wildcard. use MittEventHandler as eventHandler if type is wildcard. use MittWildcardEventHandler as wildcardHandler
on(Symbol type, {MittEventHandler? eventHandler, MittWildcardEventHandler? wildcardHandler}) → void
subscribe event type with event handler if type is not wildcard. use MittEventHandler as eventHandler if type is wildcard. use MittWildcardEventHandler as wildcardHandler
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](dynamic type) → dynamic
get specific events by type