SchemaValidatedAnalyticsProvider class
Decorator over a real AnalyticsProvider — validates every event
through registry first, forwarding only EventValidationResult.sanitizedParams
when accepted, dropping it silently otherwise (never partially, never
raw). Same decorator shape ConsentGatedAnalyticsProvider already
uses, so it composes: SchemaValidatedAnalyticsProvider(ConsentGatedAnalyticsProvider(real), registry).
A throwing inner provider never reaches caller code — gameplay
code calling logEvent (directly, or via AnalyticsProvider.maybe)
must never crash because a real analytics SDK's network call failed;
the error is forwarded to CrashReporter.maybe instead (visible in
production without crashing anything, dlog()'s exact reasoning for
existing) and swallowed.
- Implemented types
Constructors
- SchemaValidatedAnalyticsProvider(AnalyticsProvider _inner, SdkEventSchemaRegistry registry)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- registry → SdkEventSchemaRegistry
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
logEvent(
String name, [Map< String, Object?> ? params]) → void -
override
-
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