EventPlugin class

An EventPlugin receives callbacks when the fields of a GeneratedMessage change.

A GeneratedMessage mixin can install a plugin by overriding the 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

EventPlugin()

Properties

hasObservers → bool
If false, GeneratedMessage will skip calls to event handlers.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

attach(GeneratedMessage parent) → void
Initializes the plugin. [...]
beforeClearField(FieldInfo fi) → void
Called before clearing a field.
beforeSetField(FieldInfo fi, dynamic newValue) → void
Called before setting a field. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited