CometChatMediaRecorder class
CometChatMediaRecorder is a class that allows users to record audio messages. It has a start button to start recording, a stop button to stop recording, a play button to play the recorded message, a pause button to pause the recorded message, a submit button to submit the recorded message and a close button to close the media recorder.
CometChatMediaRecorder(
startIcon: Icon(Icons.mic),
playIcon: Icon(Icons.play_arrow),
pauseIcon: Icon(Icons.pause),
closeIcon: Icon(Icons.close),
stopIcon: Icon(Icons.stop),
submitIcon: Icon(Icons.send),
onSubmit: (BuildContext, String path) {
print("recording is in: $path");
},
onClose: () {
print("Closed");
},
mediaRecorderStyle: MediaRecorderStyle(
pauseIconTint: Colors.red,
playIconTint: Colors.green,
closeIconTint: Colors.red,
timerTextStyle: TextStyle(color: Colors.white),
submitIconTint: Colors.green,
startIconTint: Colors.green,
stopIconTint: Colors.red,
audioBarTint: Colors.green,
),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CometChatMediaRecorder
Constructors
- CometChatMediaRecorder({Key? key, Widget? startIcon, Widget? playIcon, Widget? pauseIcon, Widget? closeIcon, Widget? stopIcon, Widget? submitIcon, dynamic onSubmit(BuildContext, String)?, Function? onClose, MediaRecorderStyle? mediaRecorderStyle, CometChatTheme? theme})
-
const
Properties
- closeIcon → Widget?
-
closeIcon provides icon to the close Icon/widget
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mediaRecorderStyle → MediaRecorderStyle?
-
mediaRecorderStyle provides style to the media recorder
final
- onClose → Function?
-
onClose provides callback to the close Icon/widget
final
- onSubmit → dynamic Function(BuildContext, String)?
-
onSubmit provides callback to the submit Icon/widget
final
- pauseIcon → Widget?
-
pauseIcon provides icon to the play Icon/widget
final
- playIcon → Widget?
-
playIcon provides icon to the play Icon/widget
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startIcon → Widget?
-
startIcon provides icon to the start Icon/widget
final
- stopIcon → Widget?
-
stopIcon provides icon to the stop Icon/widget
final
- submitIcon → Widget?
-
submitIcon provides icon to the submit Icon/widget
final
- theme → CometChatTheme?
-
theme provides theme to the media recorder
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CometChatMediaRecorder> -
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