when<T> method
Implementation
T when<T>({
T Function(SingleCaptureRequest)? single,
T Function(MultipleCaptureRequest)? multiple,
}) {
if (this is SingleCaptureRequest) {
return single!(this as SingleCaptureRequest);
} else if (this is MultipleCaptureRequest) {
return multiple!(this as MultipleCaptureRequest);
} else {
throw Exception("Unknown CaptureResult type");
}
}