Showing
1 changed file
with
6 additions
and
0 deletions
| @@ -96,6 +96,12 @@ class SwitchCameraButton extends StatelessWidget { | @@ -96,6 +96,12 @@ class SwitchCameraButton extends StatelessWidget { | ||
| 96 | return const SizedBox.shrink(); | 96 | return const SizedBox.shrink(); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | + final int? availableCameras = state.availableCameras; | ||
| 100 | + | ||
| 101 | + if (availableCameras != null && availableCameras < 2) { | ||
| 102 | + return const SizedBox.shrink(); | ||
| 103 | + } | ||
| 104 | + | ||
| 99 | final Widget icon; | 105 | final Widget icon; |
| 100 | 106 | ||
| 101 | switch (state.cameraDirection) { | 107 | switch (state.cameraDirection) { |
-
Please register or login to post a comment