DefaultUnifiedPush class

Inheritance

Constructors

DefaultUnifiedPush()

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

getDistributor() Future<String?>
Returns the qualified identifier of the distributor used.
inherited
getDistributors(List<String> features) Future<List<String>>
Returns the qualified identifier of all available distributors on the system.
inherited
initializeCallback({void onNewEndpoint(PushEndpoint endpoint, String instance)?, void onRegistrationFailed(FailedReason reason, String instance)?, void onUnregistered(String instance)?, void onMessage(PushMessage message, String instance)?}) Future<void>
Register callbacks to receive the push messages and other infos. Please see the spec for more infos on those callbacks and their parameters. This needs to be called BEFORE registerApp so onNewEndpoint get called and you get the info in your app, or this will be lost.
inherited
initializeOnTempUnavailable(void onTempUnavailable(String instance)?) Future<void>
Register optional callback for onTempUnavailable This event is sent by the distributor if the push server is down
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(String instance, List<String> features, String? messageForDistributor, String? vapid) Future<void>
Register the app to the saved distributor with a specified token identified with the instance parameter This method needs to be called at every app startup with the same distributor and token.
inherited
saveDistributor(String distributor) Future<void>
Save the distributor to be used.
inherited
setDBusName(String? name) → void
Set the name the application will register with on the DBus session bus. Required for Linux applications.
inherited
toString() String
A string representation of this object.
inherited
tryUseCurrentOrDefaultDistributor() Future<bool>
Try to use the saved distributor else, use the default distributor of the system
inherited
unregister(String instance) Future<void>
Send an unregistration request for the instance to the saved distributor and remove the registration. Remove the distributor if this is the last instance registered.
inherited

Operators

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