MBPush class
Interface of MBMessage to MPush. This is just an interface that calls MPush SDK classes.
Constructors
- MBPush()
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- androidPushNotificationsSettings → MPAndroidNotificationsSettings?
-
Returns the settings used to show notifications on android: the channel id, name, description and the icon.
no setter
-
onNotificationArrival
→ dynamic Function(Map<
String, dynamic> )? -
Returns the callback called when a push notification arrives.
no setter
-
onNotificationTap
→ dynamic Function(Map<
String, dynamic> )? -
Returns the callback called when a push notification is tapped.
no setter
- onToken ↔ dynamic Function(String)?
-
Returns the callback called when a token is retrieved from APNS or FCM
getter/setter pair
- pushToken ↔ String
-
Returns the MPush token.
getter/setter pair
Static Methods
-
addCustomReplacements(
Map< String, String> ? customData) → Future<void> - Sets custom info for push notifications
-
configure(
{required dynamic onNotificationArrival(Map< String, dynamic> ), required dynamic onNotificationTap(Map<String, dynamic> ), required MPAndroidNotificationsSettings androidNotificationsSettings}) → Future<void> - Configures the MPush plugin with the callbacks. @param onNotificationArrival Called when a push notification arrives. @param onNotificationTap Called when a push notification is tapped. @param androidNotificationsSettings Settings for the android notification.
-
getCustomReplacements(
) → Future< Map< String, String> ?> - Remove custom replacements for push notifications
-
launchNotification(
) → Future< Map< String, dynamic> ?> -
The notification that launched the app, if present, otherwise
null
. -
registerDevice(
String token) → Future< void> - Register a device token.
-
registerToTopic(
MPTopic topic) → Future< void> - Register the current device to a topic.
-
registerToTopics(
List< MPTopic> topics) → Future<void> - Register the current device to an array of topics.
-
removeCustomReplacements(
) → Future< void> - Remove custom replacements for push notifications
-
requestToken(
) → Future< void> - Requests the token to APNS & GCM.
-
unregisterFromAllTopics(
) → Future< void> - Unregister the current device from all topics it is registred to.
-
unregisterFromTopic(
String topic) → Future< void> - Unregister the current device from a topic, the topic is matched using the code of the topic.
-
unregisterFromTopics(
List< String> topics) → Future<void> - Unregister the current device from an array of topics, the topics are matched using the code of the topic.