internal_audio_recorder 0.0.1 copy "internal_audio_recorder: ^0.0.1" to clipboard
internal_audio_recorder: ^0.0.1 copied to clipboard

A new Flutter plugin for android that record internal audio and output it as PCM file.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:internal_audio_recorder/internal_audio_recorder.dart';
import 'package:internal_audio_recorder/model/audioformat.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _internalAudioRecorderPlugin = InternalAudioRecorder();

  @override
  void initState() {
    super.initState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              MaterialButton(
                color: Colors.green,
                onPressed: () async {
                  var responce = await _internalAudioRecorderPlugin
                      .startCapturing("/", AudioFormat.encodingPCM16BIT, 44100);

                  print("Responce: $responce");
                },
                child: Text("Start Recording"),
              ),
              MaterialButton(
                color: Colors.green,
                onPressed: () async {
                  var responce =
                      await _internalAudioRecorderPlugin.stopCapturing();

                  print("Responce: $responce");
                },
                child: Text("Stop Recording"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
0
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter plugin for android that record internal audio and output it as PCM file.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on internal_audio_recorder