Created
December 17, 2019 21:31
-
-
Save azamsharp/2cd878052561fd2996a15123a719e83f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _takePicture(BuildContext context) async { | |
try { | |
await _initializeCameraControllerFuture; | |
final path = | |
join((await getTemporaryDirectory()).path, '${DateTime.now()}.png'); | |
await _cameraController.takePicture(path); | |
Navigator.pop(context,path); | |
} catch (e) { | |
print(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment