NUIPush class

Implemented types

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

changeUserId(String userId, {bool reRegister = false}) Future<DataResult>
Use it when user login or logout, to change the userId that associated to the current device. Another use case could be, verify user token when initialize the application, if the token expired, change the external ID
override
deletePushDeviceMeta({required String userId, required List<String> params}) Future<DataResult>
Delete user's device meta data
override
deleteTag(String key) Future
Delete tags if it's not required for personalized messages
override
deleteTags(List<String> keys) Future
Delete tags if it's not required for personalized messages
override
getInboxNotificationCount() Future<DataResult<int>>
Get the number of unread notification count to display on the screen
override
getInboxNotifications({required int page, required int limit}) Future<DataResult<List<NUIPushInboxMessage>>>
Get all the notifications from the current user inbox
override
getPushMessageById({required String recipientId}) Future<DataResult<NUIPushMessage>>
override
getPushMessages({required int page, required int limit}) Future<DataResult<List<NUIPushMessage>>>
override
getTags() Future<Map<String, dynamic>>
Get tags that is associated to the current user
override
getUserID() Future<String>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerPushDeviceForUser({required String deviceToken}) Future<DataResult>
Register push device with a unique identifier (FCM Token / OneSignal ID) This function will not be used usually, use changeUserId if you want
override
sendPushMessageToAll({required String title, required String content, String? subtitle, NUIEnt? data, List<String>? includedSegments, List<String>? excludedSegments, String? bigPictureUrl, String? channelId}) Future<DataResult<NUIPushOSResponse>>
Send push notification to all subscribe users
override
sendPushMessageToUsers({required String title, String? subtitle, required String content, NUIEnt? data, List<String>? userIds, String? bigPictureUrl, String? channelId}) Future<DataResult<NUIPushOSResponse>>
Send push notification to the targeted users
override
sendTag(String key, dynamic value) Future
Send tags for personalized messages
override
sendTags(Map<String, dynamic> tags) Future<Map<String, dynamic>>
Send multiple tags for personalized messages
override
setInboxNotificationRead({List<String>? notificationId, bool isRead = true}) Future<DataResult>
Set the notification as read. Use this function when the user tap into the notification details screen.
override
setLocationShared(bool enable) Future
override
setPushDeviceMeta({required String userId, required Map<String, dynamic> params}) Future<DataResult>
Set user's device meta data
override
toString() String
A string representation of this object.
inherited
updateReadStatus({required String recipientId}) Future<DataResult>
override

Operators

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

Static Properties

instance NUIPush?
no setter

Constants

NUIWEB_MODULE → const String