getDefaultMicrophones method

  1. @override
Future<List> getDefaultMicrophones()
override

Retrieves the default microphone using a method channel call to the native platform.

Implementation

@override
Future<List<dynamic>> getDefaultMicrophones() async {
  // Invoke the 'getDefaultMicrophones' method on the method channel
  // The native platform will return a list of microphones, or an empty list if none found.
  return (await methodChannel
          .invokeMethod<List<dynamic>>('getDefaultMicrophones')) ??
      <Map<String, String>>[];
}