EventSchema class

One event's contract — name, param shape, and how to handle an unrecognized field. migrate upgrades an older client's raw params to what THIS (current) schema version expects, applied before validation — same "migrate on read" convention VersionedJsonStore.migrate already uses in this package, so an app that can't ship a client update immediately still has its old-shaped events validated correctly against the newest schema.

Constructors

EventSchema({required String name, required int version, required Map<String, EventParamSchema> params, UnknownFieldPolicy unknownFieldPolicy = UnknownFieldPolicy.drop, Map<String, Object?> migrate(Map<String, Object?> raw)?})

Properties

hashCode → int
The hash code for this object.
no setterinherited
migrate → Map<String, Object?> Function(Map<String, Object?> raw)?
final
name → String
final
params → Map<String, EventParamSchema>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unknownFieldPolicy → UnknownFieldPolicy
final
version → int
final

Methods

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