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

A simple flutter plugin, that lets you play the native shutter sound for iOS and Android.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:native_shutter_sound/native_shutter_sound.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Native Shutter Sound'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              NativeShutterSound.play();
            },
            child: const Text('Play Sound'),
          ),
        ),
      ),
    );
  }
}
8
likes
140
pub points
88%
popularity

Publisher

unverified uploader

A simple flutter plugin, that lets you play the native shutter sound for iOS and Android.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on native_shutter_sound