FlutterRingtonePlayer class

The FlutterRingtonePlayer API of the flutter_ringtone_player package, running on RingtonePlayer.

Unlike the original, calls complete once playback has started and throw a RingtoneException when a sound cannot be played, and looping, volume and stop also work on iOS.

Constructors

FlutterRingtonePlayer()
Creates a player.
const

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
play({AndroidSound? android, IosSound? ios, String? fromAsset, String? fromFile, double? volume, bool? looping, bool? asAlarm}) → Future<void>
Plays a sound.
playAlarm({double? volume, bool looping = true, bool asAlarm = true}) → Future<void>
Plays the default alarm sound, looping by default.
playNotification({double? volume, bool? looping, bool asAlarm = false}) → Future<void>
Plays the default notification sound.
playRingtone({double? volume, bool looping = true, bool asAlarm = false}) → Future<void>
Plays the default ringtone, looping by default.
stop() → Future<void>
Stops the sound that is playing.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited