Skip to main content

InAppStoryManager

This singleton class is used to manage placeholders, tags, etc.

To call any method, you need to get an instance of this class:

await InAppStoryManager.instance.methodName();

Methods​

MethodDescription
setPlaceholders(Map<String, String> placeholders)change Placeholders
setTags(List<String> tags)replacing all tags
addTags(List<String> tags)add tags to current tags list
removeTags(List<String> tags)remove tags from current tags list
changeUser(String userId, {String? userSign})replace the user in the application
userLogout()logout current user
closeReaders()closing any story reader that showing
setTransparentStatusBar()sets a transparent status bar for story reader in Android.
setLocale(Locale locale)sets a locale of story reader, must be created
with region subtag (like Locale('en', 'US'))
changeSound(bool enabled)changing sound control in story reader
clearCache()clears cached stories, games, in-app-messages
setUserSettings(...)replace the user with params
showStory(String id)show single story by ID without targeting Single story
showStoryOnce(String id)show single story only if unseen Single story
showStoryWithTargeting(String id, {tags})show single story with targeting Single story
showIAMById(String id, ...)show in-app message by ID without targeting In-App Messaging
showIAMByIdWithTargeting(String id, ...)show in-app message by ID with targeting In-App Messaging
showIAMByEvent(String id, ...)show in-app message by event In-App Messaging
showIAMByEventWithTargeting(String id, ...)show in-app message by event with optional tags In-App Messaging
preloadInAppMessages({List<String>? ids})preload in-app messages In-App Messaging
showOnboarding(int limit, ...)show onboarding stories Onboardings
openGame(String gameId)open a game Games
closeGame()close currently open game Games
preloadGames()preload games Games
setGetSkusCallback()callback that used in Goods
setOnProductCartUpdate()used in Checkout to listen product cart updates
setGetProductCartState()used in Checkout to listen product cart current state
setOptions(Map<String, String> options)change Options
setErrorCallback(IASErrorCallback callback)register error callback Events
addCallToActionCallback(callback)add call to action listener Call To Action
removeCallToActionCallback(callback)remove call to action listener Call To Action