getCameras static method

Future<List<CameraDeviceInfo>?> getCameras()

Every camera the platform reports.

Implementation

static Future<List<CameraDeviceInfo>?> getCameras() async {
  final raw = await _channel.invokeMethod<List<dynamic>>('getVideoDevices');
  return (raw ?? const [])
      .map((e) => Map<dynamic, dynamic>.from(e as Map))
      .map(cameraFromMap)
      .toList(growable: false);
}