MethodChannelMoonetix class

MoonetixPlatform implementation that talks to the native SDK over a method channel. Native code calls back with event for lifecycle events.

Inheritance

Constructors

MethodChannelMoonetix()

Properties

events → Stream<MoonetixEvent>
Native events: opened, closed and errors reported by the native SDK.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

init(String appId) → Future<void>
Stores the app ID in the native SDK. Validation already happened in Dart; the native SDK validates again.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String token, MoonetixOptions options) → Future<void>
Opens the offerwall with a validated session token. Errors that happen later (network, expired token) arrive on events.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

parseEvent(Object? arguments) → MoonetixEvent?
Turns a native event map (type, and code and message for errors) into a MoonetixEvent. Returns null for anything it does not know.

Constants

channel → const MethodChannel
The channel shared with the Android and iOS plugin classes.