StoryItem class
This is a representation of a story item (or page).
Constructors
- StoryItem(Widget view, {required Duration duration, bool shown = false})
-
StoryItem.inlineImage({required String url, required StoryController controller, Key? key, BoxFit imageFit = BoxFit.cover, Map<
String, dynamic> ? requestHeaders, bool shown = false, bool roundedTop = true, bool roundedBottom = false, Widget? loadingWidget, Widget? errorWidget, Duration? duration}) -
Shorthand for creating inline image.
controller
should be same instance as one passed to theStoryView
factory -
StoryItem.inlineProviderImage(ImageProvider<
Object> image, {Key? key, bool shown = false, bool roundedTop = true, bool roundedBottom = false, Duration? duration}) -
Shorthand for creating an inline story item from an image provider such as
AssetImage
orNetworkImage
. However, the story continues to play while the image loads up.factory -
StoryItem.pageImage({required String url, required StoryController controller, Key? key, BoxFit imageFit = BoxFit.fitWidth, bool shown = false, Map<
String, dynamic> ? requestHeaders, Widget? loadingWidget, Widget? errorWidget, Duration? duration}) -
Factory constructor for page images.
controller
should be same instance as one passed to theStoryView
factory -
StoryItem.pageProviderImage(ImageProvider<
Object> image, {Key? key, BoxFit imageFit = BoxFit.fitWidth, bool shown = false, Duration? duration}) -
Shorthand for creating a story item from an image provider such as
AssetImage
orNetworkImage
. However, the story continues to play while the image loads up.factory -
StoryItem.pageVideo(String url, {required StoryController controller, Key? key, Duration? duration, BoxFit imageFit = BoxFit.fitWidth, bool shown = false, Map<
String, dynamic> ? requestHeaders, Widget? loadingWidget, Widget? errorWidget}) -
Shorthand for creating page video.
controller
should be same instance as one passed to theStoryView
factory
Properties
- duration → Duration
-
Specifies how long the page should be displayed. It should be a reasonable
amount of time greater than 0 milliseconds.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shown ↔ bool
-
Has this page been shown already? This is used to indicate that the page
has been displayed. If some pages are supposed to be skipped in a story,
mark them as shown
shown = true
.getter/setter pair - view → Widget
-
The page content
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited