StoryContentState<T extends StoryContent> class
abstract
State class for StoryContent. This class provides EasyDevStory functionality to story contents.
Constructors
Properties
- context → BuildContext
-
The location in the tree where this widget builds.
no setterinherited
- controller → EasyDevStoryController
-
Provided or default EasyDevStoryController.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- loadingScreen → Widget
-
Custom loading screen or EasyDevStory default loading screen.
no setter
- mounted → bool
-
Whether this State object is currently in a tree.
no setterinherited
- position → StoryPosition
-
Returns this contents position.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- widget → T
-
The current configuration.
no setterinherited
Methods
-
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
deactivate(
) → void -
Called when this object is removed from the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
override
-
didUpdateWidget(
covariant T oldWidget) → void -
Called whenever the widget configuration changes.
inherited
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
override
-
initContent(
) → FutureOr< void> - Called when StoryContent is finished its initialization. You can call methods provided by StoryContentState inside of this method. 'initContent' method is the first place that you can use provided methods.
-
initState(
) → void -
Called when this object is inserted into the tree.
inherited
-
loadFile(
{String? cacheKey, Map< String, String> ? requestHeaders, required String url}) → Future<File> - Fetch a file from the given url and cache it to local storage.
-
markReady(
{required Duration duration}) → void - Marks the story content as ready to start. Call this method when content is ready to be display.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPause(
) → void - Called when the story is paused. In this method, pause video, audio or any other progressing content but do not reset its progress.
-
onResume(
) → void - This method is called when story is resumed. It is called after the onPause method.
-
onStart(
) → void - This method is called when content is on screen and should start. Start your video, audio or any progressing content inside of this method.
-
onStop(
) → void - Called when story is not visible on screen and should stop. Stop any progressing content and reset it's progress to prevent from playing while this content is not visible.
-
onTimeout(
) → void - Called when the end of the set timeout is reached.
-
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
setState(
VoidCallback fn) → void -
Notify the framework that the internal state of this object has changed.
inherited
-
setTimeout(
Duration timeout) → void - Sets a timeout to call markReady. Use this method to set a time limit to take action when your content isn't ready at the requested time. Create your action in the onTimeout method.
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited