@ -87,6 +87,9 @@ class CameraAurora extends CameraPlatform {
BuildContext context,
BoxConstraints constraints,
) {
if (constraints.maxWidth.isNaN || constraints.maxHeight.isNaN) {
return const SizedBox.shrink();
}
CameraAuroraPlatform.instance
.resizeFrame(constraints.maxWidth, constraints.maxHeight);
return CameraViewfinder(
@ -52,8 +52,11 @@ class _CameraViewfinderState extends State<CameraViewfinder> {
),
);
} else if (_cameraState.isNotEmpty()) {
int turn = 0;
if (_cameraState.width == 0 || _cameraState.height == 0) {
bool isFront = _cameraState.id.contains('front');
switch (_cameraState.mountAngle) {