EzVideoPlayer class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- EzVideoPlayer
Constructors
- EzVideoPlayer({Key? key, required VideoPlayerController controller, required String semantics, required Color iconColor, Decoration controlsBackground = const BoxDecoration(color: Colors.transparent), MainAxisAlignment controlsAlignment = MainAxisAlignment.center, ButtonVis playVis = ButtonVis.auto, ButtonVis volumeVis = ButtonVis.auto, bool variableVolume = true, ButtonVis replayVis = ButtonVis.auto, ButtonVis sliderVis = ButtonVis.auto, bool showOnPause = false, bool autoPlay = true, bool autoLoop = false, double startingVolume = 0.0, double maxWidth = double.infinity, double maxHeight = double.infinity})
-
Stacks play, mute, and replay buttons on top of an AspectRatio for the
controller
Also supports tap-to-pause on the main window via MouseRegion The visibility of each button can be controlled with ButtonVis Optionally provide a BoxDecoration background for the controls region The video will begin muted unlessstartingVolume
is specified Optionally providemaxWidth
andmaxHeight
to shape the videoconst
Properties
- autoLoop → bool
-
final
- autoPlay → bool
-
final
- controller → VideoPlayerController
-
final
- controlsAlignment → MainAxisAlignment
-
MainAxisAlignment for where the controls should appear
final
- controlsBackground → Decoration
-
Container decoration for the region behind the controls
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Color.withOpacity value that should be used when the player is not in focus
final
- iconColor → Color
-
Color shared by all icons/buttons
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxHeight → double
-
BoxConstraints maximum height for the play area
final
- maxWidth → double
-
BoxConstraints maximum width for the play area
final
- playVis → ButtonVis
-
final
- replayVis → ButtonVis
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semantics → String
-
String description for the video to appear in accessibilty Semantics
final
- showOnPause → bool
-
Whether buttons set to ButtonVis.auto should always show when the video is paused
final
- sliderVis → ButtonVis
-
final
- startingVolume → double
-
final
- variableVolume → bool
-
final
- volumeVis → ButtonVis
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _EzVideoPlayerState -
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