Are Flutter available cameras deterministic?

Viewed 13

I would like to know whether Flutter's available cameras is deterministic. I know that I can get a list of cameras like this:

import 'package:camera/camera.dart';

(....)

List<CameraDescription> cameras = [];
cameras = await availableCameras();

(....)
final camera = cameras[_preferedCamera]; // get always the prefered camera by index
_controller = CameraController(
      camera,
      ResolutionPreset.max,
      enableAudio: false,
);

However, I am not sure whether it will always return the cameras in the same list order. I know this will be different per device, but that's okay.

Why is this important? Because my users want to take photos always using the prefered camera, and I need to save that information.

0 Answers
Related