serializeExposureMode function Null safety

String serializeExposureMode(
  1. ExposureMode exposureMode
)

Returns the exposure mode as a String.

Implementation

String serializeExposureMode(ExposureMode exposureMode) {
  switch (exposureMode) {
    case ExposureMode.locked:
      return 'locked';
    case ExposureMode.auto:
      return 'auto';
    default:
      throw ArgumentError('Unknown ExposureMode value');
  }
}