DVAudioFocus class final

Arbitrates audio focus between this application's players, and with the platform.

Constructors

DVAudioFocus([DVAudioFocusBackend _backend = const DVProcessAudioFocusBackend()])

Properties

hashCode → int
The hash code for this object.
no setterinherited
holder → Object?
The player holding focus, or null.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

acquire(Object owner, {required void onLoss()}) → Future<bool>
Takes focus for owner. The previous holder, if any, is told through its own onLoss before this returns. False when the platform refused.
dispose() → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release(Object owner) → Future<void>
Gives focus back if owner holds it. A no-op otherwise, so a player that lost focus to another can release without taking it from them.
toString() → String
A string representation of this object.
inherited

Operators

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