VoiceMessagePlayer class
A widget that displays a voice message view with play/pause functionality.
The VoiceMessagePlayer widget is used to display a voice message with customizable appearance and behavior. It provides a play/pause button, a progress slider, and a counter for the remaining time. The appearance of the widget can be customized using various properties such as background color, slider color, and text styles.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- VoiceMessagePlayer
Constructors
- VoiceMessagePlayer({Key? key, required VoiceController controller, Color backgroundColor = Colors.white, Color activeSliderColor = Colors.red, Color? notActiveSliderColor, Color circlesColor = Colors.green, double innerPadding = 12, double cornerRadius = 20, double size = 38, Widget refreshIcon = const Icon(Icons.refresh, color: Colors.white), Widget pauseIcon = const Icon(Icons.pause_rounded, color: Colors.white), Widget playIcon = const Icon(Icons.play_arrow_rounded, color: Colors.white), Widget stopDownloadingIcon = const Icon(Icons.close, color: Colors.white), Decoration? playPauseButtonDecoration, TextStyle circlesTextStyle = const TextStyle(color: Colors.white, fontSize: 10, fontWeight: FontWeight.bold), TextStyle counterTextStyle = const TextStyle(fontSize: 11, fontWeight: FontWeight.w500), Color playPauseButtonLoadingColor = Colors.white})
-
const
Properties
- activeSliderColor → Color
-
The color of the active slider.
final
- backgroundColor → Color
-
The background color of the voice message view.
final
- circlesColor → Color
-
final
- circlesTextStyle → TextStyle
-
The text style of the circles.
final
- controller → VoiceController
-
The controller for the voice message view.
final
- cornerRadius → double
-
The corner radius of the outer container.
final
- counterTextStyle → TextStyle
-
The text style of the counter.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerPadding → double
-
The padding between the inner content and the outer container.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- notActiveSliderColor → Color?
-
The color of the not active slider.
final
- pauseIcon → Widget
-
The pause icon of the play/pause button.
final
- playIcon → Widget
-
The play icon of the play/pause button.
final
- playPauseButtonDecoration → Decoration?
-
The play Decoration of the play/pause button.
final
- playPauseButtonLoadingColor → Color
-
The loading Color of the play/pause button.
final
- refreshIcon → Widget
-
The refresh icon of the play/pause button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
The size of the play/pause button.
final
- stopDownloadingIcon → Widget
-
The stop downloading icon of the play/pause button.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< VoiceMessagePlayer> -
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}) → 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