setPauseWhenDucked method

  1. @override
Future<void> setPauseWhenDucked(
  1. bool enabled
)
override

Pause instead of being ducked when another app speaks briefly (a navigation prompt), for spoken-word content. Has no effect where the platform doesn't duck.

Implementation

@override
Future<void> setPauseWhenDucked(bool enabled) async {
  if (defaultTargetPlatform != TargetPlatform.android) return;
  await methodChannel.invokeMethod('setPauseWhenDucked', enabled);
}