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.
- Use Platform channels .This is avails more options to you but will involve writing java/kotlin code
- 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!