File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ class CameraPickerState extends State<CameraPicker> {
329
329
/// Initialize cameras instances.
330
330
/// 初始化相机实例
331
331
Future <void > initCameras ({CameraDescription cameraDescription}) async {
332
- cameraController? .dispose ();
332
+ await cameraController? .dispose ();
333
333
334
334
/// When it's null, which means this is the first time initializing the cameras.
335
335
/// So cameras should fetch.
@@ -516,10 +516,11 @@ class CameraPickerState extends State<CameraPicker> {
516
516
return Padding (
517
517
padding: const EdgeInsets .symmetric (horizontal: 12.0 ),
518
518
child: Row (
519
- children: const < Widget > [
520
- Spacer (),
519
+ children: < Widget > [
520
+ const Spacer (),
521
521
// TODO(Alex): There's an issue tracking NPE of the camera plugin, so switching is temporary disabled .
522
- // if ((cameras?.length ?? 0) > 1) switchCamerasButton,
522
+ if ((cameras? .length ?? 0 ) > 1 )
523
+ switchCamerasButton,
523
524
],
524
525
),
525
526
);
You can’t perform that action at this time.
0 commit comments