releva_sdk 0.0.58
releva_sdk: ^0.0.58 copied to clipboard
Releva.ai SDK for Flutter apps
0.0.58 #
- Session timeout fix We consider a session has ended after 30 mintues of inactivity (industry standard as of 2026)
- Bar banner fix in top position The close button is now positioned properly to prevent a few pixels clipped at the top
0.0.57 #
- Banner close button color fix Fixed banner close button not respecting color settings.
0.0.56 #
- Lifecycle-based session tracking. Sessions are now counted based on app lifecycle events (foreground/background transitions with >30s threshold) instead of push-call timing gaps. Each new session generates a fresh
sessionId, replacing the old separate 24h expiry timer. This makesdevice.sessionsaccurately reflect "how many times the user opened the app." - Fix banner text color ignoring content-level
colorproperty. Text and heading elements in banner designs now correctly read the Unlayercolorfield, with fallback totextColorthen body default. Previously onlytextColorwas checked, causing content with explicitcolor(e.g. white text on dark background) to render in the body default color (black).
0.0.55 #
- Story viewer: interactive slide elements now work alongside navigation. Buttons, linked images, carousels, and menus inside story slides can now be tapped and swiped without triggering slide navigation. Navigation uses
HitTestBehavior.translucentso taps on non-interactive areas (text, backgrounds, empty space) still navigate between slides. Previously, the story viewer intercepted all gestures, making in-slide elements non-interactive. RelevaNotificationAction.toString()added for easier debugging of push notification payloads.NavigationServicestripped down to anavigatorKeyholder. The opinionated navigation methods (handleNotificationNavigation,_navigateToRoute,goToHome,getCurrentRouteName) have been removed. Apps already handle navigation via theonNotificationTappedcallback (required since v0.0.53), so these methods were unused dead code.NavigationService.instance.navigatorKeyremains available as an optional convenience.url_launcherremoved from SDK dependencies. It was only used by the removed navigation methods. Apps that useurl_launcherin theironNotificationTappedcallback already declare it as their own dependency.- README: added
onLinkTaptoBannerDisplayWidgetexample and removed hardcodedscreenToken.
0.0.54 #
- Inbox navigation from push notifications.
NavigationServicenow handlestarget: "inbox"natively — it looks up the message viaInboxService.getMessageById(), marks it as read, and navigates to/inboxwith the resolved message ID in parameters. Apps no longer need to implement inbox routing in theironNotificationTappedcallback. - README improvements. Added
onLinkTapcallback to theBannerDisplayWidgetexample. Updated push notification documentation to includeinboxas a navigation target alongsidescreenandurl.
0.0.53 #
Breaking changes #
-
enablePushEngagementTrackingnow requiresonNotificationTapped. The old optional callback withNotificationResponsehas been replaced with a required callback that receives aRelevaNotificationAction— a structured object with parsedtarget,screen,url, andparametersfields. The built-inNavigationServiceauto-navigation has been removed; apps must handle navigation in the callback.Before:
await client.enablePushEngagementTracking(); // or await client.enablePushEngagementTracking( onNotificationTapped: (NotificationResponse response) { ... }, );After:
await client.enablePushEngagementTracking( onNotificationTapped: (RelevaNotificationAction action) async { final navigator = NavigationService.instance.navigatorKey.currentContext; if (navigator == null) return; if (action.target == 'screen' && action.screen != null) { Navigator.of(navigator).pushNamedAndRemoveUntil( action.screen!, (route) => route.isFirst, arguments: action.parameters); } else if (action.target == 'url' && action.url != null) { final uri = Uri.tryParse(action.url!); if (uri != null) await launchUrl(uri, mode: LaunchMode.externalApplication); } }, ); -
RelevaClient.isRelevaMessage()now matches allRELEVA_*messages. The check was broadened from an exactRELEVA_NOTIFICATION_CLICKmatch to astartsWith('RELEVA_')prefix check to support future message types such asRELEVA_INBOX_SYNC. Apps that callisRelevaMessage()to gate UI decisions or navigation should also checkmessage.data['click_action'] == 'RELEVA_NOTIFICATION_CLICK'before acting, to avoid reacting to silent inbox sync pushes. -
New
InboxService.getMessageById(int inboxMessageId)helper. Refreshes the inbox and returns the matchingInboxMessage, ornullif not found. Use this when handling inbox navigation from push notifications instead of reimplementing the lookup yourself.final message = await InboxService.instance.getMessageById( int.parse(action.parameters['inboxMessageId']), );
Other changes #
- New
setEndpointOverride(String? url)method onRelevaClient. Overrides the API endpoint URL at runtime (e.g. for local development with ngrok). Passnullto revert to the default. The override applies to all API calls including inbox. InboxServicerefactored to useRelevaClientfor all HTTP calls.InboxServiceno longer manages its own HTTP client, access token, realm, or endpoint override. It delegates all networking toRelevaClientvia theInboxApiClientinterface.InboxService.initialize()now takes a{required InboxApiClient client}parameter instead of individual fields.- Releva messages identified by
click_actionprefix.isRelevaMessage()now checksclick_action.startsWith('RELEVA_')instead of exact match onRELEVA_NOTIFICATION_CLICK. Standalone silent inbox sync pushes useclick_action: 'RELEVA_INBOX_SYNC'and are handled without displaying a notification. Backward compatible with older SDKs. - No Android manifest configuration required.
The
RELEVA_NOTIFICATION_CLICKintent filter is no longer needed since the SDK uses data-only FCM messages handled via local notifications. - Inbox sync signal is now piggybacked on the visible push notification instead of being sent as a separate silent FCM message. No app-side changes needed.
- Inbox sync signal key changed from
magellan_notification_type: "inbox_sync"toinbox_sync: "true", scoped inside the Releva message check to avoid conflicts with other SDKs.
0.0.52 #
- Banner rendering & click/close signal improvements
0.0.51 #
- Fix duplicate push notification click tracking on cold start caused by handling the launch notification in both
onDidReceiveNotificationResponseandgetNotificationAppLaunchDetails
0.0.50 #
- Add NPS Support
0.0.49 #
- Remove harcoded Colors.blue.shade50 from banner_display_widget background
0.0.48 #
- Add stories support
0.0.47 #
- Add app inbox support
0.0.46 #
- Remove all harcoded paddinngs from banner display widget
0.0.45 #
- Use unlayer's design json to render bannners using native components
0.0.44 #
- Correctly handle DateTime conversion to ISO-8601 for custom fields.
0.0.43 #
- Bump http to ^1.0.0
0.0.42 #
- Remove ngrok endpoints that were added by mistake in the last version
0.0.41 #
- Update other files in github related to version in github
0.0.40 #
- Updated README.md file
0.0.39 #
- Added a second parameter to
setProfileId()function, it is calledskipMergeWithPreviousProfileIdand it is used withtruewhen a user logs out of their profile. - Fixed edge cases when profiles were not merging
- Fixed type bug in ProductRecommendation
0.0.38 #
- Fix not calling callback
- Added NotificationResponse parameter to
onNotificationTappedcallback to provide access to raw Android notification data when handling multiple notification actions
0.0.37 #
- NEW: Add
onNotificationTappedcallback parameter toenablePushEngagementTracking() - FEATURE: Custom notification tap callback for handling navigation and custom actions
- BEHAVIOR CHANGE: When callback is provided, SDK skips automatic navigation (user handles it)
- BEHAVIOR: When callback is NOT provided, SDK handles navigation automatically (backward compatible)
- Engagement tracking always happens regardless of callback presence
0.0.36 #
- Support both data-only push payloads (next) and data+notification payloads (current as of Oct 15 2025)
0.0.35 #
- Add banner impression event when banner is visible
0.0.34 #
- Downgrade flutter_widget_from_html version to be compatible with carsome app
0.0.33 #
- add pushRequest.search('query') support
0.0.32 #
- Support banners
- Clean up unused functionality
0.0.31 #
- Add client.isRelevaMessage method
0.0.30 #
- Fix, previous version does not comform to spec
0.0.29 #
- Method for handling engagement tracking in your app's hooks
0.0.27 #
- Refactor and release next iteration
0.0.26 #
- NEW: Inbox messages with structured data and native Flutter widgets
- NEW: Character limit validation (Title: 45, Short Description: 40, Description: 350, CTA: 10 chars)
- NEW: InboxMessageWidget for native message display (no HTML rendering)
- NEW: Automatic message type detection with
isInboxMessageproperty - UPDATED: InAppMessage model with shortDescription, description, and cta fields
- UPDATED: MessageDisplayManager to handle inbox messages
- UPDATED: Hive type adapters for new message fields
- TESTS: Added comprehensive inbox message tests with character validation
- NEW: Support push notification app links
0.0.14 #
- Use builder pattern for request
0.0.13 #
- Remove deviceId from constructor (different strategies in the future)
0.0.12 #
- Fix custom field serialization
0.0.11 #
- Fix empty events list edge case
0.0.10 #
- Fix serialization of wishlist products list
0.0.9 #
- Fix serialization of CustomEvent list
0.0.8 #
- Fix serualization of WishlistProduct
0.0.7 #
- Split client API into .screenView and customEvents
0.0.6 #
- Fix custom field encoding
0.0.5 #
- Add proper context and options objects
0.0.4 #
- Print response body
0.0.3 #
- Fix serualization of CartProduct
0.0.2 #
- Fix types
0.0.1 #
- Initial release.