HeadlessService class

Constructors

HeadlessService.new({String backendUrl = 'https://api.novu.co', String socketUrl = 'https://ws.novu.co', required String applicationIdentifier, String? subscriberId, String? subscriberHash, int? retry, int retryDelay = 10000, dynamic onUnreadChanged(int)?, dynamic onUnseenChanged(int)?, dynamic onReceived(Notification)?, List<InboxTab> tabs = const []})

Properties

applicationIdentifier String
latefinal
backendUrl String
final
hashCode int
The hash code for this object.
no setterinherited
onReceived → dynamic Function(Notification)?
final
onUnreadChanged → dynamic Function(int)?
final
onUnseenChanged → dynamic Function(int)?
final
prefs → SharedPreferencesAsync
final
retry int?
final
retryDelay int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socketUrl String
final
subscriberHash String?
final
subscriberId String?
final
tabs List<InboxTab>
final

Methods

completeNotificationAction(String id, ButtonType action) Future<String>
countNotifications({bool? read, bool? archived, List<String> tags = const []}) Future<int>
fetchPreferences({List<String> tags = const []}) Future<List<PreferencesResponse>>
getNotifications({bool archived = false, bool? read, int page = 0, int limit = 10, List<String> tags = const []}) Future<PaginatedResponse<InboxNotification>>
initializeSocket([String? token]) → void
markAllNotificationAs(MarkAllNotificationAs status, {List<String> tags = const []}) Future<void>
markNotificationAs(String id, MarkNotificationAs status) Future<InboxNotification>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reverseNotificationAction(String id, ButtonType action) Future<String>
toString() String
A string representation of this object.
inherited
updateGlobalPreferences(Map<String, bool> preferences) Future<PreferencesResponse>
Update global preferences
updateWorkflowPreferences(String workflowId, Map<String, bool> preferences) Future<PreferencesResponse>
Update global preferences

Operators

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