record
7.2.0, released 9 days ago by cow-level.ovh
Record audio from the microphone to a file or stream with multiple codec options.
What it does
Provides a cross‑platform API to capture audio on Android, iOS, macOS, Windows, web and Linux. Supports pause/resume, amplitude monitoring, device selection and various encoders.
AI-written summary of version 7.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to record audio locally or stream it in real time.
- You require support for multiple platforms and codecs.
Skip it when
- You need a pure Dart solution without native dependencies.
- You cannot install external tools on Linux (parecord, pactl, ffmpeg).
Strengths
- Broad platform coverage with feature parity.
- Multiple encoder choices including AAC, Opus, WAV, FLAC, PCM.
- Stream‑based API for real‑time processing.
Weaknesses
- Linux requires external binaries to be installed.
- Background recording support was removed in v7.0.0.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 6
Add microphone permission entries for Android, iOS and macOS. Install parecord, pactl and ffmpeg on Linux. Follow platform‑specific setup guides for Android and iOS.
import 'package:record/record.dart';
final recorder = AudioRecorder();
if (await recorder.hasPermission()) {
await recorder.start(const RecordConfig(), path: 'myFile.m4a');
// ...
final filePath = await recorder.stop();
}
recorder.dispose();Alternatives
Packages that do the same job and could replace record.
- audioplayers
A Flutter plugin to play multiple audio files simultaneously
87Compare - flutter_sound_record
Record audio from the microphone to a file with configurable codec, bitrate and sample rate.
42Compare - audioplayers_platform_interface
Platform interface for the audioplayers Flutter plugin.
77Compare - flutter_recorder
Low-level cross-platform audio recorder plugin using miniaudio with real-time waveform, FFT and volume.
87Compare
Works with
Packages commonly used together with record: ones it builds on, ones built on it, and its own family.
- stream_chat_flutterBuilt on recordFull-featured Flutter UI SDK for Stream Chat, providing ready‑made chat widgets and theming.
- waveform_recorderBuilt on recordFlutter package for recording audio with real-time waveform visualization.
- vadBuilt on recordVAD is a cross-platform Voice Activity Detection system, allowing Flutter applications to seamlessly handle various VAD events using Silero VAD v4/v5 models.
- quran_libraryBuilt on recordAn integrated package for displaying the Holy Qur’an identical to the Medina Quran with the narration of Hafs on the authority of Asim.
- social_media_recorderBuilt on recordA widget that adds a social‑media style button to record audio to a file.