{"repo":"inway/flutter_ringtone_player","free":true,"listed":false,"github":"https://github.com/inway/flutter_ringtone_player","clone":"git clone https://github.com/inway/flutter_ringtone_player.git","description":"Simple Flutter plugin to play ringtone, alarm & notification sounds","language":"Dart","stars":102,"topics":["ringtone","sound","flutter","android","ios","dart","flutter-plugin"],"license":"MIT","category":"mobile-apps","readme_excerpt":"flutter ringtone player A simple ringtone, alarm & notification player plugin. Usage Add following import to your code: Then simply call this to play system default notification sound: There's also this generic method allowing you to specify in detail what kind of ringtone should be played: Also you can specify a custom ringtone from assets, or provide direct path to file that works for both Android and iOS: You can specify a platform specific ringtone and it will override the one from assets: .play() optional attributes Attribute Description -------------- ------------ bool looping Enables looping of ringtone. Requires FlutterRingtonePlayer().stop(); to stop ringing. double volume Sets ringtone volume in range 0 to 1.0. bool asAlarm Allows to ignore device's silent/vibration mode and play given sound anyway. To stop looped ringtone please use: Above works only on Android, and please note that by default Alarm & Ringtone sounds are looped. Default sounds Method Android iOS ---------------- ------- --- playAlarm RingtoneManager.TYPE ALARM IosSounds.alarm playNotification RingtoneManager.TYPE NOTIFICATION IosSounds.triTone playRingtone RingtoneManager.TYPE RINGTONE IosSounds.electronic Note on iOS sounds If you want to use any other sound on iOS you can always specify a valid Sound ID and manually construct [IosSound]:","default_branch":null,"files":null,"tree":[],"storefront":"/r/inway","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/inway/flutter_ringtone_player/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}