Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is that possible to play default notification sound of a device in flutter?

Tags:

flutter

Is that possible to play default notification sound of a device (for both android and ios) in flutter? I tried SystemSound.play(SystemSoundType.click);, it doesn't do anything. thanks.

like image 395
sgon00 Avatar asked Jul 28 '18 11:07

sgon00


1 Answers

You can use the flutter_ringtone_player plugin to play the default notification sound for both Android and iOS platforms as follows:

FlutterRingtonePlayer.playNotification();
like image 152
Ali Türkay Avci Avatar answered Oct 20 '22 05:10

Ali Türkay Avci