I'm working on a flutter app that is using the Camera package's camera preview.
I'm initializing the camera controller like so:
final controller = CameraController(
_cameras[0],
ResolutionPreset.ultraHigh,
enableAudio: false,
imageFormatGroup: ImageFormatGroup.bgra8888,
);
The ResolutionPreset
enum has these options:
enum ResolutionPreset {
/// 352x288 on iOS, 240p (320x240) on Android
low,
/// 480p (640x480 on iOS, 720x480 on Android)
medium,
/// 720p (1280x720)
high,
/// 1080p (1920x1080)
veryHigh,
/// 2160p (3840x2160)
ultraHigh,
/// The highest resolution available.
max,
}
The resolution needs to be 4032x2034
. How do I use a custom resolution?