EventPlugin class abstract
An EventPlugin
receives callbacks when the fields of a GeneratedMessage
change.
A GeneratedMessage mixin can install a plugin by overriding the GeneratedMessage.eventPlugin property. The intent is provide mechanism, not policy; each mixin defines its own public API, perhaps using streams.
This is a low-level, synchronous API. Event handlers are called in the
middle of protobuf changes. To avoid exposing half-finished changes to user
code, plugins should buffer events and send them asynchronously. (See
event_mixin.dart
for an example.)
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasObservers → bool
-
If false, GeneratedMessage will skip calls to event handlers.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attach(
GeneratedMessage parent) → void - Initializes the plugin.
-
beforeClearField(
FieldInfo fi) → void - Called before clearing a field.
-
beforeSetField(
FieldInfo fi, Object? newValue) → void - Called before setting a field.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited