SimplePlayerControls class

The interface layer of the player.

It is rendered as a sibling of SimpleVideoSurface inside a Stack, never as its child, so it always receives the full player box as its constraints — whatever BoxFit the video underneath is using.

The layout is deliberately minimal: a title over a top scrim, one central play/pause button and a bottom bar with the elapsed time, the full screen toggle and an edge to edge seek bar.

Inheritance

Constructors

SimplePlayerControls({Key? key, required String title, required Color colorAccent, required bool visible, required bool isFullScreen, required bool isBuffering, required bool showMuteBadge, required bool muted, required Duration position, required Duration duration, required Duration buffered, required Animation<double> playPauseProgress, required VoidCallback onTap, required VoidCallback onPlayPause, required VoidCallback onFullScreen, required ValueChanged<Duration> onSeek, required ValueChanged<bool> onScrubbing, required VoidCallback onToggleMute})
const

Properties

buffered Duration
final
colorAccent Color
final
duration Duration
final
hashCode int
The hash code for this object.
no setterinherited
isBuffering bool
final
isFullScreen bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
muted bool
final
onFullScreen VoidCallback
final
onPlayPause VoidCallback
final
onScrubbing ValueChanged<bool>
final
onSeek ValueChanged<Duration>
final
onTap VoidCallback
final
onToggleMute VoidCallback
final
playPauseProgress Animation<double>
final
position Duration
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showMuteBadge bool
final
title String
final
visible bool
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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