FlutterRingtonePlayer class
Simple player for system sounds like ringtones, alarms and notifications.
On Android it uses system default sounds for each ringtone type. On iOS it uses some hardcoded values for each type.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
play(
{AndroidSound? android, IosSound? ios, String? fromAsset, double? volume, bool? looping, bool? asAlarm}) → Future< void> - This is generic method allowing you to specify individual sounds you wish to be played for each platform
-
playAlarm(
{double? volume, bool looping = true, bool asAlarm = true}) → Future< void> - Play default alarm sound (looping on Android)
-
playNotification(
{double? volume, bool? looping, bool asAlarm = false}) → Future< void> - Play default notification sound
-
playRingtone(
{double? volume, bool looping = true, bool asAlarm = false}) → Future< void> - Play default system ringtone (looping on Android)
-
stop(
) → Future< void> - Stop looping sounds like alarms & ringtones on Android. This is no-op on iOS.