FlutterReelsViewer class
Stateful widget to display preloaded videos inside page view.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FlutterReelsViewer
Constructors
-
FlutterReelsViewer.asset({Key? key, required List videoSourceList, required double height, required double width, BoxFit videoBoxFit = BoxFit.contain, VideoOverlayWidgetBuilder? overlayBuilder, Axis scrollDirection = Axis.vertical, int preloadPagesCount = 1, VideoPlayerOptions? videoPlayerOptions, String? package, Future<
ClosedCaptionFile> ? closedCaptionFile, ScrollPhysics? scrollPhysics, bool reverse = false, bool pageSnapping = true, bool playInLoop = true, PreloadPageController? pageController, dynamic getCurrentVideoController(CachedVideoPlayerController? videoPlayerController)?, dynamic onPageChanged(CachedVideoPlayerController? videoPlayerController, int index)?, bool showControlsOverlay = true, bool showVideoProgressIndicator = true}) - plays videos from list of asset videos
-
FlutterReelsViewer.file({Key? key, required List videoSourceList, required double height, required double width, BoxFit videoBoxFit = BoxFit.contain, VideoOverlayWidgetBuilder? overlayBuilder, Axis scrollDirection = Axis.horizontal, int preloadPagesCount = 1, VideoPlayerOptions? videoPlayerOptions, Map<
String, String> ? httpHeaders, Future<ClosedCaptionFile> ? closedCaptionFile, ScrollPhysics? scrollPhysics, bool reverse = false, bool pageSnapping = true, bool playInLoop = true, PreloadPageController? pageController, dynamic getCurrentVideoController(CachedVideoPlayerController? videoPlayerController)?, dynamic onPageChanged(CachedVideoPlayerController? videoPlayerController, int index)?, bool showControlsOverlay = true, bool showVideoProgressIndicator = true}) - plays videos from list of video files
-
FlutterReelsViewer.network({Key? key, required List videoSourceList, required double height, required double width, BoxFit videoBoxFit = BoxFit.contain, VideoOverlayWidgetBuilder? overlayBuilder, Axis scrollDirection = Axis.horizontal, int preloadPagesCount = 1, VideoPlayerOptions? videoPlayerOptions, Map<
String, String> ? httpHeaders, VideoFormat? formatHint, Future<ClosedCaptionFile> ? closedCaptionFile, ScrollPhysics? scrollPhysics, bool reverse = false, bool pageSnapping = true, bool playInLoop = true, PreloadPageController? pageController, dynamic getCurrentVideoController(CachedVideoPlayerController? videoPlayerController)?, dynamic onPageChanged(CachedVideoPlayerController? videoPlayerController, int index)?, bool showControlsOverlay = true, bool showVideoProgressIndicator = true}) - plays videos from list of network video urls
Properties
-
closedCaptionFile
↔ Future<
ClosedCaptionFile> ? -
getter/setter pair
- formatHint ↔ VideoFormat?
-
getter/setter pair
- getCurrentVideoController ↔ dynamic Function(CachedVideoPlayerController? videoPlayerController)?
-
getCurrentVideoController return the current playing video controller
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ double
-
getter/setter pair
-
httpHeaders
↔ Map<
String, String> ? -
getter/setter pair
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onPageChanged ↔ dynamic Function(CachedVideoPlayerController? videoPlayerController, int index)?
-
onPageChanged calls when swiping through the pages, return
current playing video controller and index
getter/setter pair
- overlayBuilder ↔ VideoOverlayWidgetBuilder?
-
Widget that will show as a overlay on the video
getter/setter pair
- package ↔ String?
-
getter/setter pair
- pageController ↔ PreloadPageController?
-
PreloadPageView
controllergetter/setter pair - pageSnapping ↔ bool
-
getter/setter pair
- playInLoop ↔ bool
-
To play videos in a continuous loop.
Note: This feature cannot be disabled if the showControlsOverlay property is turned off.
getter/setter pair
- preloadPagesCount ↔ int
-
number of videos getting initialized defined by preloadPagesCount
getter/setter pair
- reverse ↔ bool
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDirection ↔ Axis
-
scroll direction of preload page view
getter/setter pair
- scrollPhysics ↔ ScrollPhysics?
-
getter/setter pair
- showControlsOverlay ↔ bool
-
getter/setter pair
- showVideoProgressIndicator ↔ bool
-
getter/setter pair
- sourceType ↔ VideoSource
-
enum sourceType values holds the type of source Network, Assets or File
getter/setter pair
- videoBoxFit ↔ BoxFit
-
getter/setter pair
- videoPlayerOptions ↔ VideoPlayerOptions?
-
getter/setter pair
- videoSourceList ↔ List
-
videoSourceList is List or dynamic video sources
getter/setter pair
- width ↔ double
-
getter/setter pair
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FlutterReelsViewer> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited