PusherBeams class

A web implementation for PusherBeamsPlatform plugin. This is designed to be a singleton and must be consumed with PusherBeams.instance.

Inheritance
  • Object
  • PlatformInterface
  • PusherBeamsPlatform
  • PusherBeams

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDeviceInterest(String interest) Future<void>
Adds an interest in this device. Throws NullRejectionException or Exception in case the JS promise fails.
override
clearAllState() Future<void>
Clear all the state from PusherBeams library, leaving an empty state. Throws NullRejectionException or Exception in case the JS promise fails.
override
clearDeviceInterests() Future<void>
Unsubscribes all interests from this device. Throws NullRejectionException or Exception in case the JS promise fails.
override
getDeviceInterests() Future<List<String?>>
Get the interests registered in this device. Returns a List containing the interests as String. Throws NullRejectionException or Exception in case the JS promise fails.
override
getInitialMessage() Future
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onInterestChanges(OnInterestsChange callback) Future<void>
This is not implemented on web platform
override
onMessageReceivedInTheForeground(OnMessageReceivedInTheForeground callback) Future<void>
override
removeDeviceInterest(String interest) Future<void>
Removes an interest in this device. Throws NullRejectionException or Exception in case the JS promise fails.
override
setDeviceInterests(List<String> interests) Future<void>
Sets the interests provided with a List. This overrides and unsubscribe any interests not listed in interests. Throws NullRejectionException or Exception in case the JS promise fails.
override
setUserId(String userId, BeamsAuthProvider provider, OnUserCallback callback) Future<void>
Sets authentication for this device, so you can send notifications specifically for this device. You must create a BeamsAuthProvider in order to pass the provider argument. Throws NullRejectionException or Exception in case the JS promise fails.
override
start(String instanceId) Future<void>
Register this device to Pusher Beams service with the given instanceId.
override
stop() Future<void>
Stops by deleting all the state, remotely and locally. You must call PusherBeams.instance.start() again if you want to receive notifications. Throws NullRejectionException or Exception in case the JS promise fails.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance PusherBeams
The instance of PusherBeams.
no setter

Static Methods

registerWith(Registrar registrar) → void