promptStyle property

(UNTESTED)

Implementation

Future<AVAudioSessionPromptStyle?> get promptStyle async {
  // TODO: Use this code without the '?' once a Dart bug is fixed.
  // (similar instances occur elsewhere)
  //final index = await _channel.invokeMethod<int>('getPromptStyle');
  final index = await _channel.invokeMethod<int?>('getPromptStyle');
  return index == null
      ? null
      : decodeEnum(AVAudioSessionPromptStyle.values, index,
          defaultValue: AVAudioSessionPromptStyle.none);
}