Additional Methods#
The Storyteller class exposes a broad set of utilities on top of the primary widgets. This page highlights the most popular calls grouped by scenario. All methods live in package:storyteller_sdk/storyteller_sdk.dart.
Player status & control#
Future<bool> Storyteller.isInitialized()– check whether the native SDK has finished initialising.Future<bool> Storyteller.isPlayerVisible()– returnstruewhile the full-screen player is on screen. Available on Android only.Future<bool> Storyteller.isPresentingContent()– reports whether any Storyteller UI is currently visible. Available on iOS only.Future<void> Storyteller.dismissPlayer({bool animated = true, String? dismissReason})– close the player programmatically.Future<void> Storyteller.resumePlayer()– resume playback after your app temporarily paused it.
Navigation helpers#
Future<void> Storyteller.openStory(String id)– open a specific story by Storyteller identifier.Future<void> Storyteller.openStoryByExternalId(String externalId)– open a story using the external identifier you provided to Storyteller.Future<void> Storyteller.openPage(String id)/openSheet(String id)– deep link into a particular page or sheet.Future<void> Storyteller.openCategory(String category)– launch the player scoped to a Storyteller category.Future<void> Storyteller.openCollection(String id, {String? clipId, StorytellerTheme? theme})– present a collection and optionally jump to a specific clip.Future<void> Storyteller.openCollectionWithCategory(String id, {String? category, StorytellerTheme? theme})– apply an additional category filter when opening a collection.Future<void> Storyteller.openClipByExternalId(String collectionId, String externalId)– target a clip referenced by your external identifier within a collection.Future<void> Storyteller.openSearch()andFuture<bool> Storyteller.isSearchEnabled()– launch Storyteller search when the native configuration allows it.
Deep links#
Future<bool> Storyteller.isStorytellerDeeplink(String url)– detect whether a URL should be handled by Storyteller.Future<void> Storyteller.openDeeplink(String url)– forward Storyteller URLs to the native SDK.Stream<String> Storyteller.userNavigatedToApp– emits URLs when a user taps a Storyteller deep link that should be handled by your Flutter router.
Analytics & counts#
Stream<UserActivityEvent> Storyteller.onUserActivityOccurred– receive detailed interaction payloads for analytics use-cases.Future<int> Storyteller.getStoriesCount(List<String> categoryIds)– fetch the number of stories for the supplied categories.Future<int> Storyteller.getClipsCount(String collectionId)– fetch the number of clips inside a collection.Future<EventTrackingOptions> Storyteller.eventTrackingOptions()– inspect the current tracking configuration.Stream<String> Storyteller.onLog– subscribe to native SDK log output (useful while debugging).
Categories & following#
Future<void> Storyteller.addFollowedCategory(String category)/addFollowedCategories(List<String>)– mark categories as followed for the current user.Future<void> Storyteller.removeFollowedCategory(String category)– undo a follow.Future<List<String>> Storyteller.followedCategories()– read the current list, typically to sync with your own profile service.Future<bool> Storyteller.isCategoryFollowed(String categoryId)– convenience helper for toggles.Stream<CategoryFollowEvent> Storyteller.categoryFollowActionTaken– observe follow/unfollow events triggered from Storyteller UI.
Appearance & localisation#
Future<void> Storyteller.setTheme(StorytellerTheme theme)– override colours and typography for any subsequent Storyteller UI. Build the theme map usingStorytellerThemehelpers or JSON.Future<void> Storyteller.setLocale(String locale)– force the locale (e.g."en-US"); otherwise the device locale is used.
Each call returns a Future that completes when the native method channel responds. Wrap your invocations in try/catch blocks to surface platform exceptions gracefully.