Search packages, repositories and app categories

social_media_recorder cover
Package detailsv1.2.1

social_media_recorder

A Flutter package for both android and iOS which provides Audio recorder from microphone to a given file path through Button to record voice like social media Button

AndroidiOSWindows
30-day downloads
270
Likes
178
Pub points
130

Install package

flutter pub add social_media_recorder

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package enabling audio recording from the microphone to a specified file path, designed with a social media-style record button interface. It supports both Android and iOS platforms, offering a simple, intuitive way to capture voice recordings similar to those found in social media apps. The package is ideal for integrating voice note functionality into apps requiring quick, on-the-go audio capture. It includes a straightforward API for starting and stopping recordings, making it accessible for developers.

Use cases

  • Voice notes in social media apps
  • Audio messaging features
  • Quick voice recording for content creation
  • In-app podcast recording
  • User-generated audio content
  • Real-time voice capture for live interactions

Key features

  • Social media-style record button
  • Cross-platform support (Android, iOS, Windows)
  • Simple API for start/stop recording
  • File path output for saved recordings
  • Built-in microphone access
  • Lightweight and easy integration

Suitable for

  • Developers building social media apps
  • Apps needing voice message functionality
  • Educational or creative tools with audio input
  • Mobile-first applications with audio features
  • Teams creating interactive user experiences

Considerations

  • Requires microphone permissions on target devices
  • File path management must be handled by the app
  • Limited to audio-only recording
  • No built-in playback or editing features
  • Platform-specific behavior may vary
  • Windows support may have limited testing

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

social_media_recorder

A Flutter package for both android and iOS which provides Audio recorder from microphone to a given file path through Button to record voice like social media Button

Video

images

Android
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
        ...
        android:requestLegacyExternalStorage="true">

min SDK: 16 (29 if you use OPUS)

iOs
<key>NSMicrophoneUsageDescription</key>
<string>We need to access to the microphone to record audio file</string>

and add permission to ios -> podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
               '$(inherited)',

               ## dart: PermissionGroup.microphone
               'PERMISSION_MICROPHONE=1',
             ]
    end
  end
end

min SDK: 8.0 (11 if you use OPUS)

Supported encoders


enum AudioEncoder {
  /// Will output to MPEG_4 format container
  AAC,

  /// Will output to MPEG_4 format container
  AAC_LD,

  /// Will output to MPEG_4 format container
  AAC_HE,

  /// sampling rate should be set to 8kHz
  /// Will output to 3GP format container on Android
  AMR_NB,

  /// sampling rate should be set to 16kHz
  /// Will output to 3GP format container on Android
  AMR_WB,

  /// Will output to MPEG_4 format container
  /// /!\ SDK 29 on Android /!\
  /// /!\ SDK 11 on iOs /!\
  OPUS,
}
Android

https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder

iOs

https://developer.apple.com/documentation/coreaudiotypes/coreaudiotype_constants/1572096-audio_data_format_identifiers

Usage

Align(
   
     alignment: Alignment.centerRight,
     
     child: SocialMediaRecorder(
   
     sendRequestFunction: (soundFile) {
   
     # soundFile represent the sound you recording
   
     },
   
     encode: AudioEncoderType.AAC,
   
  ),

);

Categories

Dependencies

Dependency list 6 items

Source repository

Projects using this package