RingtonesApi class
Ringtones management API (Android only).
Provides access to system ringtones, notifications, and alarms. Throws PlatformException on non-Android platforms.
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
-
get(
String ringtoneUri, {bool withMetadata = true}) → Future< Ringtone?> - Gets detailed information about a ringtone.
-
getAll(
{RingtoneType? type, bool withMetadata = false}) → Future< List< Ringtone> > - Gets all available ringtones.
-
getDefaultUri(
RingtoneType type) → Future< String?> - Gets the default ringtone URI for the given type.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pick(
RingtoneType type, {String? existingUri}) → Future< String?> - Opens the system ringtone picker and returns the selected ringtone URI.
-
play(
String ringtoneUri) → Future< void> - Plays the ringtone at the given URI.
-
setDefaultUri(
RingtoneType type, String? ringtoneUri) → Future< void> - Sets the default ringtone URI for the given type.
-
stop(
) → Future< void> - Stops the currently playing ringtone.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- instance → const RingtonesApi