환경

flutter: 3.29.0

camera: ^0.10.0+1

android 10

문제

https://pub.dev/packages/camera

 

camera | Flutter package

A Flutter plugin for controlling the camera. Supports previewing the camera feed, capturing images and video, and streaming image buffers to Dart.

pub.dev

위 조합에서 camera plugin의 preview가 정상적으로 보이지 않는 현상이 있다.

android 11 이상에선 문제가 없었다. 아마 10 이하에서 어떤 문제가 있는 듯하다.

preview가 안나오거나 깨진 그래픽 현상이 보인다.

해결

https://github.com/flutter/flutter/issues/165037

 

[camera] Preview is blank on Samsung S9+ (Android 10) · Issue #165037 · flutter/flutter

Steps to reproduce Test 1: camera plugin version 0.10.6 dependency: camera_android version 0.10.9+16 Test 2: camera plugin version 0.11.1 dependency: camera_android_camerax version 0.6.14 Concrete ...

github.com

이슈를 뒤적거리다가 "We think this was fixed in 3.29.2" 라는 Contributor의 댓글이 있다.

flutter 3.32.7 버전으로 업데이트하니 문제가 해결됐다.