fancy_audio_recorder 0.0.2 copy "fancy_audio_recorder: ^0.0.2" to clipboard
fancy_audio_recorder: ^0.0.2 copied to clipboard

Simple audio recorder ready to use (Like instant soup).

example/lib/main.dart

import 'dart:developer';

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Fancy Sample App',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Fancy Sample App'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String? audioPath;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: Text(widget.title),
        ),
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              AudioRecorderButton(
                maxRecordTime: const Duration(seconds: 80),
                onRecordComplete: (audioPath) {
                  log('$audioPath');
                  setState(() {
                    this.audioPath = audioPath;
                  });
                },
              ),
              Text('$audioPath'),
            ],
          ),
        ));
  }
}
12
likes
130
points
42
downloads

Publisher

unverified uploader

Weekly Downloads

Simple audio recorder ready to use (Like instant soup).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

assets_audio_player, flutter, path, path_provider, record

More

Packages that depend on fancy_audio_recorder