Skip to content
pubscout

waveform_recorder

2.0.0, released 2 weeks ago by sellsbrothers.com

Flutter package for recording audio with real-time waveform visualization.

WASM-ready
$ flutter pub add waveform_recorder
Source repository

What it does

Provides a WaveformRecorder widget and WaveformRecorderController to record audio while visualizing the waveform in real time. It supports cross-platform audio recording and exposes the resulting recording as an XFile.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building chat applications that require voice messaging features.
  • You need to show a real-time audio waveform while recording sound.

Skip it when

  • You only need background audio playback without recording or visual waveforms.

Strengths

  • Real-time waveform visualization during recording
  • Cross-platform support including web, mobile, and desktop
  • Clean controller-based API with automatic state management

Weaknesses

  • Requires manual platform setup and permissions via the underlying record package
  • Temporary files on native platforms must be manually cleaned up by your app

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
6

Requires setting up the underlying record package instructions, including platform-specific permissions like microphone access (e.g., NSMicrophoneUsageDescription on macOS).

import 'package:flutter/material.dart';
import 'package:waveform_recorder/waveform_recorder.dart';

class RecorderExample extends StatefulWidget {
  const RecorderExample({super.key});

  @override
  State<RecorderExample> createState() => _RecorderExampleState();
}

class _RecorderExampleState extends State<RecorderExample> {
  final _waveController = WaveformRecorderController();

  @override
  void dispose() {
    _waveController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) => Scaffold(
        body: Center(
          child: _waveController.isRecording
              ? WaveformRecorder(
                  height: 48,
                  controller: _waveController,
                )
              : ElevatedButton(
                  onPressed: () => _waveController.startRecording(),
                  child: const Text('Start Recording'),
                ),
        ),
      );
}

Alternatives

Packages that do the same job and could replace waveform_recorder.

  • audioplayers

    Pick if your primary requirement is playing back recorded audio streams or files rather than recording with a waveform.

Works with

Packages commonly used together with waveform_recorder: ones it builds on, ones built on it, and its own family.