supportedExposureModes method

  1. @override
Future<List<ExposureMode>> supportedExposureModes()
override

Retrieve all supported exposure modes for a device.

Implementation

@override
Future<List<ExposureMode>> supportedExposureModes() async {
  verifyInitialized();
  verifyNotDisposed();
  final List<int> exposureModes =
      await device.device.exposureModesSupported(<int>[
    CaptureExposureMode.locked,
    CaptureExposureMode.continuousAutoExposure,
  ]);

  final List<ExposureMode> supportedModes = <ExposureMode>[];
  for (int mode in exposureModes) {
    switch (mode) {
      case CaptureExposureMode.locked:
        supportedModes.add(ExposureMode.locked);
        break;
      case CaptureExposureMode.continuousAutoExposure:
        supportedModes.add(ExposureMode.continuous);
        break;
    }
  }
  return supportedModes;
}