AdvStoryController class abstract

A controller for manipulating flow and listening user interactions.

Provides methods to skip, pause, resume contents and stories, show and hide widgets on story contents, enable or disable gestures, capture and block events before they happen and more.

Implementers

Constructors

AdvStoryController.new()
Creates an AdvStoryController.
factory

Properties

contentCount int
Total content count in currently displaying story.
no setter
hasClient bool
Returns true if a story view is currently visible. Most methods like toNextContent, toPreviousStory can't be used and throws an exception if the story view is not visible.
no setter
hashCode int
The hash code for this object.
no setterinherited
isComponentsVisible bool
Returns true if footer, header and indicators are visible, false otherwise.
no setter
isGesturesDisabled bool
If gestures are disabled returns true, otherwise false.
no setter
isPaused bool
Returns true if the story is paused, false otherwise.
no setter
position StoryPosition
Displaying story and content position. Returns 0,0 if no story is currently displayed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storyCount int
Total count of stories.
no setter

Methods

addListener(StoryEventCallback callback) → void
Register a closure to be called when any story event happens.
disableGestures() → void
Prevents gesture events.
enableGestures() → void
Allows gesture events.
hideComponents() → void
Hides header, footer and story indicator. When gestures didn't disabled user can show them by tapping screen.
jumpTo({required int story, required int content}) → void
Jumps to the content in story story.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
Pauses the current story, this stops the timer and the story will not skip to the next item. This method doesn't hide header, footer and indicator after pause.
preloadMediaFile({required String url, String? cacheKey, Map<String, String>? requestHeaders}) Future<File>
Useful when you want to extend AdvStory media load strategy.
removeInterceptor() → void
Clears previously registered interceptor.
removeListener(StoryEventCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
removeTrayTapInterceptor() → void
Clears previously registered tray tap interceptor.
resume() → void
Resumes the current story, starts the timer and indicator from last position and story skips as usual.
setInterceptor(Interceptor interceptor) → void
Registers a function to intercept and replace default story event actions except StoryEvent.trayTap.
setTrayTapInterceptor(TrayTapInterceptor interceptor) → void
Registers a function to intercept and replace default tray tap event action.
showComponents() → void
Shows header, footer and story indicator.
toNextContent() → void
Skips to the next content if available. Otherwise skips to the next story or closes the story view.
toNextStory() → void
Skips to the next story if available. Otherwise closes the story view.
toPreviousContent() → void
Skips to previous content if available. Otherwise skips to the previous story or does nothing.
toPreviousStory() → void
Skips to the previous story if available. Otherwise does nothing.
toString() String
A string representation of this object.
inherited

Operators

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