PushNotificationService class

Service that configures FCM messaging. Any component can subscribe to inbound push notifications via PushNotificationService.pushStream, but a PushHandlerService is required for exclusive handling of an inbound message. Basically, if you want to display something.

Mixed in types
Available Extensions

Constructors

PushNotificationService(Getter<BuildContext?> context, AppInfo appInfo, {required Stream<AuthUserProfile> userStateStream, required Future<bool> sendDevicePushToken(BuildContext context, User user, String token), required dynamic convertMessage(String? envelopeType, String? body)})

Properties

appInfo AppInfo
final
convertMessage → dynamic Function(String? envelopeType, String? body)
final
hashCode int
The hash code for this object.
no setteroverride
log → Logger
no setterinherited
loggerName String
no setterinherited
pushNotificationToken String?
no setter
pushStream Stream<PushMessageContent>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendDevicePushToken Future<bool> Function(BuildContext context, User user, String token)
final
userStateStream Stream<AuthUserProfile>
final

Methods

dispose() Future
inherited
doSendPushToken(BuildContext context, String token) Future
doShutdown() Future
override
exec<R>(R block()) → R
inherited
handleMessage(BuildContext context, SourcedPushMessage source) Future
initialize(Getter<BuildContext?> context, Stream<AuthUserProfile?> userChanges) Future
isShuttingDown() bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLogin(AsyncOrCallback onLogin) → void
inherited
onLogout(AsyncOrCallback onLogout) → void
inherited
onShutdown(_AsyncCallback callback) → void
inherited
onStartup(_AsyncCallback callback) → void
inherited
registerDisposer(FutureOr dispose()) → void
inherited
registerFcmToken(Getter<BuildContext?> context) Future
registerListener(String key, PushMessageConsumer consumer) → void
registerLoginHooks(IAuthState authState) → void
inherited
removeDisposer(FutureOr dispose()) → void
inherited
removeListener(String key) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override