Voice Memo
A slide-up sheet that appears when recording a voice message in chat. It shows the recording time, waveform, and buttons to stop, send, or cancel the memo.
Figma Link
- Web Components
- Flutter
Web component not available yet
Demo
Inheritance
Object
> DiagnosticableTree
> Widget
> StatefulWidget
> ZetaStatefulWidget
Constructors
Constructs a ZetaVoiceMemo.
ZetaVoiceMemo.new({Key? key, bool? rounded, String recordingLabel = 'Recording message...', String maxLimitLabel = 'Recording message {timer} seconds left...', String sendMessageLabel = 'Send message?', String playingLabel = 'Playing...', String recordingNotAllowedLabel = 'Recording not allowed.', VoidCallback? onDiscard, void onSend(Uint8List audioStream)?, bool canRecord = true, Duration maxRecordingDuration = const Duration(seconds: 120), Duration warningDuration = const Duration(seconds: 15), RecordConfig recordConfig = const RecordConfig(encoder: AudioEncoder.pcm16bits, sampleRate: 16000, numChannels: 1, bitRate: 64000), double loudnessMultiplier = 10})
Properties
Name | Description | Type | Features |
---|---|---|---|
canRecord | Whether the user can record a voice memo. | bool | final |
hashCode | The hash code for this object. | int | no setter inherited |
key | Controls how one widget replaces another widget in the tree. | Key? | final inherited |
loudnessMultiplier | Multiplier for the loudness of the waveform visualization during recording. | double | final |
maxLimitLabel | The label shown when the voice memo exceeds the maximum limit. | String | final |
maxRecordingDuration | The maximum duration for the voice memo recording. | Duration | final |
onDiscard | Callback for when the delete button is pressed. | VoidCallback? | final |
onSend | Callback for when the send button is pressed. | void Function(Uint8List audioStream)? | final |
playingLabel | The label shown when the voice memo is playing. | String | final |
recordConfig | Configuration for audio recorder from Record package. | RecordConfig | final |
recordingLabel | The label shown when recording a voice memo. | String | final |
recordingNotAllowedLabel | The label shown when recording is not allowed. Typically this will be due to permissions issues, but that is not always the case. | String | final |
rounded | Sets rounded or sharp border of the containing box and the icon style. | bool? | final inherited |
runtimeType | A representation of the runtime type of the object. | Type | no setter inherited |
sendMessageLabel | The label shown on the button to send the voice memo. | String | final |
warningDuration | The duration from the end of the recording to when the warning should be shown. | Duration | final |