recordVideo static method

Future<void> recordVideo(
  1. CaptureRequest request
)

Implementation

static Future<void> recordVideo(CaptureRequest request) {
  final pathBySensor = request.when(
    single: (single) => {
      single.sensor.toPigeon(): single.file?.path,
    },
    multiple: (multiple) => multiple.fileBySensor
        .map((key, value) => MapEntry(key.toPigeon(), value?.path)),
  );
  if (Platform.isAndroid) {
    return CameraInterface().recordVideo(
      pathBySensor.keys.toList(),
      pathBySensor.values.toList(),
    );
  } else {
    return CameraInterface().recordVideo(
      pathBySensor.keys.toList(),
      pathBySensor.values.toList(),
    );
  }
}