VoiceMessage class

This is the main widget.

Inheritance

Constructors

VoiceMessage({Key? key, String? audioSrc, Duration? duration, String formatDuration(Duration duration)?, bool showDuration = false, dynamic onPlay()?, Widget? statusAndTime, bool? isSender, required Color senderBgColor, required Color receiverBgColor})

Properties

audioSrc String?
Audio Source, for now we support remote url (mp3,ogg) since we're caching files, audio source will be fetched locally
final
duration Duration?
This is the duration of processed audio file.
getter/setter pair
formatDuration String Function(Duration duration)?
This function takes a 'Duration' object representing audio time and formats it to the "mm:ss" format.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isSender bool?
Who is the sender of the message. From me or from someone else in group or one to one chat.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onPlay → dynamic Function()?
This function serves as a callback that will be triggered when the play button is tapped.
final
receiverBgColor Color
the background color applied to chat bubble of message from the other user
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
senderBgColor Color
the background color applied to chat bubble of message from you
final
showDuration bool
this will show audio duration
final
statusAndTime Widget?
This widget is used to display both the time and status message (tick, sent, delivered, and seen)
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _VoiceMessageState
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