voice_message_package 2.2.1 copy "voice_message_package: ^2.2.1" to clipboard
voice_message_package: ^2.2.1 copied to clipboard

Flutter package to play/puase voice message in chat messengers.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart';
import 'package:voice_message_package/voice_message_package.dart';

void main() => runApp(const MyApp());

///
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) => Sizer(
        builder: (_, __, ___) => MaterialApp(
          debugShowCheckedModeBanner: false,
          home: Scaffold(
            backgroundColor: Colors.grey.shade200,
            body: Center(
              child: SingleChildScrollView(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  mainAxisSize: MainAxisSize.min,
                  children: [
                    SizedBox(height: 50.h),
                    VoiceMessageView(
                      controller: VoiceController(
                        audioSrc:
                            'https://dl.solahangs.com/Music/1403/02/H/128/Hiphopologist%20-%20Shakkak%20%28128%29.mp3',
                        maxDuration: const Duration(seconds: 10),
                        isFile: false,
                        onComplete: () {
                          /// do something on complete
                        },
                        onPause: () {
                          /// do something on pause
                        },
                        onPlaying: () {
                          /// do something on playing
                        },
                        onError: (err) {
                          /// do somethin on error
                        },
                      ),
                      innerPadding: 12,
                      cornerRadius: 20,
                    ),
                    SizedBox(height: 80.h),
                  ],
                ),
              ),
            ),
          ),
        ),
      );
}
235
likes
130
pub points
96%
popularity

Publisher

verified publishermehran.monster

Flutter package to play/puase voice message in chat messengers.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_cache_manager, just_audio, syncfusion_flutter_sliders

More

Packages that depend on voice_message_package