hardware_button_listener 0.0.1
hardware_button_listener: ^0.0.1 copied to clipboard
A Flutter package that allows you to listen to physical hardware button presses on Android devices, providing key information like button name and key code through a reactive stream-based API.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add hardware_button_listener
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
hardware_button_listener: ^0.0.1
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:hardware_button_listener/hardware_button_listener.dart';