InAppMessageManager class

Motor de mensagens in-app: guarda as mensagens elegíveis, avalia os gatilhos e a frequência, e apresenta a mensagem (widget por omissão ou via handler).

Uma única instância vive dentro do PushService; a app não precisa de a gerir — usa PushService.addTrigger/PushService.fetchInAppMessages.

Constructors

InAppMessageManager({required InAppFetch fetch, required InAppTrack track, required PushServiceHandler handler, GlobalKey<NavigatorState>? navigatorKey})

Properties

fetch → InAppFetch
final
handler → PushServiceHandler
final
hashCode → int
The hash code for this object.
no setterinherited
messages → List<PushInAppMessage>
no setter
Necessário para o SDK conseguir mostrar a mensagem sozinho. Sem ele, o SDK delega a apresentação em PushServiceHandler.onInAppMessage.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
track → InAppTrack
final

Methods

addTrigger(String key, [String? value]) → void
Define (ou remove, com value nulo) um gatilho personalizado.
checkTriggers() → void
Reavalia os gatilhos (ex.: a app sabe que algo mudou).
clearTriggers() → void
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh() → Future<void>
Volta a buscar as mensagens elegíveis.
removeTrigger(String key) → void
start() → Future<void>
Inicia a sessão: busca as mensagens e agenda os gatilhos temporais.
toString() → String
A string representation of this object.
inherited

Operators

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