getAllCameraDevices method
Retrieve information for all available camera devices.
Implementation
@override
Future<List<CameraDevice>> getAllCameraDevices() async {
final CaptureDeviceDiscoverySession session =
await CaptureDeviceDiscoverySession.discoverySessionWithDeviceTypes(
deviceTypes: <String>[CaptureDeviceType.builtInWideAngleCamera],
mediaType: MediaType.video,
position: CaptureDevicePosition.unspecified,
);
return session.devices
.map<CameraDevice>((CaptureDevice device) => CameraDevice(device))
.toList();
}