RingtonePlayer class
Player for system sounds like ringtone, alarm and notification.
- 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
-
alarm(
{double? volume, bool loop = true, bool alarm = true, AlarmMeta? alarmMeta}) → Future< void> - Play default alarm sound
-
notification(
{double? volume, bool loop = false, bool alarm = false, AlarmMeta? alarmMeta}) → Future< void> - Play default notification sound
-
play(
{required AndroidSound android, required IosSound ios, double? volume = 1.0, bool? loop, bool? alarm, AlarmMeta? alarmMeta}) → Future< void> - Using this method which allows you to specify individual sound as you wish to play for each platform.
-
ringtone(
{double? volume, bool loop = true, bool alarm = false, AlarmMeta? alarmMeta}) → Future< void> - Play default system ringtone
-
stop(
) → Future< void> - Stop sounds like alarm & ringtone on Android. This is no-op on iOS.