Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
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
deletePushDeviceMeta ({required String userId , required List <String > params })
→ Future <DataResult >
Delete user's device meta data
deleteTag (String key )
→ Future
Delete tags if it's not required for personalized messages
deleteTags (List <String > keys )
→ Future
Delete tags if it's not required for personalized messages
getInboxNotificationCount ()
→ Future <DataResult<int > >
Get the number of unread notification count to display on the screen
getInboxNotifications ({required int page , required int limit })
→ Future <DataResult<List <NUIPushInboxMessage > > >
Get all the notifications from the current user inbox
getPushMessageById ({required String recipientId })
→ Future <DataResult<NUIPushMessage > >
getPushMessages ({required int page , required int limit })
→ Future <DataResult<List <NUIPushMessage > > >
getTags ()
→ Future <Map <String , dynamic > >
Get tags that is associated to the current user
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
sendPushMessageToAll ({required String title , String ? subtitle , required String content , NUIEnt? data , List <String > ? includedSegments , List <String > ? excludedSegments , String ? bigPictureUrl , String ? channelId })
→ Future <DataResult<NUIPushOSResponse > >
Send push notification to all subscribe users
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
sendTag (String key , dynamic value )
→ Future
Send tags for personalized messages
sendTags (Map <String , dynamic > tags )
→ Future <Map <String , dynamic > >
Send multiple tags for personalized messages
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.
setLocationShared (bool enable )
→ Future
setPushDeviceMeta ({required String userId , required Map <String , dynamic > params })
→ Future <DataResult >
Set user's device meta data
toString ()
→ String
A string representation of this object.
inherited
updateReadStatus ({required String recipientId })
→ Future <DataResult >