MyMiniVideoPlayer class
A customizable mini video player.
Supports local or network videos with a control overlay. The bottom control bar places the timer to the left, the slider in the middle, and the full‑screen (or minimize) button to the right. An InkWell covering the entire area toggles the controls. In full‑screen mode (if enabled), a settings icon at top right toggles a small settings panel showing playback speed and quality options, but only if those options are provided.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MyMiniVideoPlayer
Constructors
-
MyMiniVideoPlayer.new({Key? key, required String videoSource, bool isAsset = false, Map<
String, String> ? qualitySources, List<double> ? speedOptions, Color? containerColor = Colors.black, double? containerCircularRadius = 12, List<BoxShadow> ? containerBoxShadow, EdgeInsetsGeometry? containerPadding = const EdgeInsets.all(0), EdgeInsetsGeometry? containerMargin = const EdgeInsets.all(8), double? containerHeight, double? containerWidth, BoxShape? containerShape, double? aspectRatio, Color? playPauseIconColor = Colors.white, Color? sliderActiveColor = Colors.red, Color? sliderInactiveColor = Colors.grey, Color? sliderThumbColor = Colors.red, TextStyle? timerTextStyle = const TextStyle(fontSize: 12, color: Colors.white), Duration? animationDuration = const Duration(milliseconds: 300), Duration autoHideDuration = const Duration(seconds: 3), bool showPlayPause = true, bool showSlider = true, bool showTimer = true, bool showFullScreenButton = true, bool showSettingsButton = false, bool isFullScreen = false, VideoPlayerController? externalController, bool disposeController = true}) -
const
Properties
- animationDuration → Duration?
-
final
- aspectRatio → double?
-
final
- autoHideDuration → Duration
-
final
-
containerBoxShadow
→ List<
BoxShadow> ? -
final
- containerCircularRadius → double?
-
final
- containerColor → Color?
-
final
- containerHeight → double?
-
final
- containerMargin → EdgeInsetsGeometry?
-
final
- containerPadding → EdgeInsetsGeometry?
-
final
- containerShape → BoxShape?
-
final
- containerWidth → double?
-
final
- disposeController → bool
-
final
- externalController → VideoPlayerController?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAsset → bool
-
final
- isFullScreen → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- playPauseIconColor → Color?
-
final
-
qualitySources
→ Map<
String, String> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showFullScreenButton → bool
-
final
- showPlayPause → bool
-
final
- showSettingsButton → bool
-
final
- showSlider → bool
-
final
- showTimer → bool
-
final
- sliderActiveColor → Color?
-
final
- sliderInactiveColor → Color?
-
final
- sliderThumbColor → Color?
-
final
-
speedOptions
→ List<
double> ? -
final
- timerTextStyle → TextStyle?
-
final
- videoSource → String
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _MyMiniVideoPlayerState -
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