Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter - How to detect Device's Sound Preference, is in Silent or Vibrate Mode?

so far I didn't find any library or packages that support to read the phone's sound preference. Because I want to detect, if the phone is in silent mode, then my apps should not play any sound. Currently, even I set my phone to silent/vibrant mode, the sound still can be played.

Any Idea?

Is this related to native thing?

Thank You

like image 791
zukijuki Avatar asked Dec 22 '25 04:12

zukijuki


1 Answers

You could try the volume plugin

https://pub.dev/packages/volume

It has a get current volumne method

await Volume.getVol
like image 166
Atree Leaf Avatar answered Dec 23 '25 20:12

Atree Leaf