UserComSDK class

Constructors

UserComSDK()

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

buildNotificationOnMessageReceived({required BuildContext context, required RemoteMessage message, required dynamic onTap(NotificationType type, String link), dynamic inAppMessageBuilder(InAppMessageModel)?, dynamic pushMessageBuilder(PushNotificationMessage)?}) → void
Use inAppMessageBuilder and notificationMessageBuilder to build custom notification onTap is called when user interacts with push or inApp notification
getPushMessage(Map<String, dynamic> json) → PushNotificationMessage?
If Firebase message data is coming from User.com, parse the message Object and retur if it's Push message. Used for displaying in terminated state.
initialize({required String mobileSdkKey, String? integrationsApiKey, required String appDomain, String? fcmToken, bool enableLogging = true}) Future<void>
Trigger initialize method before You use any SDK methods.
isUserComMessage(Map<String, dynamic> json) bool
Check if Firebase message is coming from User.com
logoutUser() Future<void>
Sending logout event to user.com project Deleting all cache and requests from app memory If user was registered before logout, You can post events to same user after passing user_id If user wasnt registered this function will lose all reference to user
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notificationClickedEvent({required String id, required NotificationType type}) Future<void>
Use this method to notify User.com service that notification was opened Trigger this only when You specify onInAppMessage and onNotificationMessage inside buildNotificationOnMessageReceived function
registerUser({Customer? customer}) Future<void>
Used to add more info to user
sendCustomEvent({required String eventName, required Map<String, dynamic> data}) Future<void>
Report your own event to user.com project. Event must contain eventName and data data can contain Map parsed to simple types.
sendProductEvent({required ProductEvent event}) Future<void>
Create ProductEvent object and pass there attributes You want to collect ProductEvent requires productId and ProductEventType Pass parameters as Map. It must be parsed to simple types.
sendScreenEvent({required String screenName}) Future<void>
If project uses Navigator for app routing You can pass UserSdkNavigatorObserver inside MaterialWidget And this event will be triggered automatically
setFcmToken(String token) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance UserComSDK
Creates or gets object instance In project Use UserComSDK.instance to trigger methods
no setter