I am building an app that would act as a remote for presentations. I would like to use the volume buttons to trigger some sort of event. Can I capture hardware button clicks in flutter?


Solution 1: kenn

You have two option.

  1. Use Platform channels .This is avails more options to you but will involve writing java/kotlin code
  2. At pub.dartlang.org/packages there are packages such as system_shortcuts 0.1.0 or flutter_lock_screen which you check to see if they can fulfill your needs.


Solution 2: Hansol

New plugin called Hardware Buttons was released, which supports detecting volume button events.

You may have a go with that!

Thanks