headsetevent_fix

Last updated:

0 purchases

headsetevent_fix Image
headsetevent_fix Images
Add to Cart

Description:

headsetevent fix

Headset Event Flutter Plugin #
A Flutter plugin to get a headset event.
Migrated to AndroidX
Usage #
To use this plugin, add headset_event as a dependency in your pubspec.yaml file.
Example #
// Import package
import 'package:headsetevent/headsetevent.dart';

// Instantiate it
HeadsetEvent headsetPlugin = new HeadsetEvent();
HeadsetState headsetEvent;

/// if headset is plugged
headsetPlugin.getCurrentState.then((_val){
setState(() {
headsetEvent = _val;
});
});

/// Detect the moment headset is plugged or unplugged
headsetPlugin.setListener((_val) {
setState(() {
headsetEvent = _val;
});
});
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.