setActive method

Future<bool> setActive(
  1. bool active
)

Sets the audio session active or inactive

Implementation

Future<bool> setActive(bool active) async {
  if (active) {
    return await _focusManager.requestFocus();
  } else {
    return await _focusManager.abandonFocus();
  }
}