setControllerPreset method
Set a preset configuration for a CameraController.
To guarantee that a CameraOutput returns a value from CameraOutput.outputSize, a user should await the future returned by this method.
Implementation
@override
Future<void> setControllerPreset(CameraControllerPreset preset) async {
verifyInitialized();
verifyNotDisposed();
await Future.wait(
outputs.cast<PresetChangeListener>().map<Future<void>>(
(PresetChangeListener listener) => listener.updatePreset(preset)),
eagerError: true,
);
}