Showing
1 changed file
with
13 additions
and
0 deletions
| @@ -115,6 +115,19 @@ class _BarcodeScannerWithControllerState | @@ -115,6 +115,19 @@ class _BarcodeScannerWithControllerState | ||
| 115 | iconSize: 32.0, | 115 | iconSize: 32.0, |
| 116 | onPressed: () => controller.switchCamera(), | 116 | onPressed: () => controller.switchCamera(), |
| 117 | ), | 117 | ), |
| 118 | + IconButton( | ||
| 119 | + color: Colors.white, | ||
| 120 | + icon: Icon(Icons.browse_gallery), | ||
| 121 | + iconSize: 32.0, | ||
| 122 | + onPressed: () async { | ||
| 123 | + // final ImagePicker _picker = ImagePicker(); | ||
| 124 | + // // Pick an image | ||
| 125 | + // final XFile? image = await _picker.pickImage(source: ImageSource.gallery); | ||
| 126 | + // if (image != null) { | ||
| 127 | + // controller.analyzeImage(image.path); | ||
| 128 | + // } | ||
| 129 | + }, | ||
| 130 | + ), | ||
| 118 | ], | 131 | ], |
| 119 | ), | 132 | ), |
| 120 | ), | 133 | ), |
-
Please register or login to post a comment