Skip to content

Instantly share code, notes, and snippets.

@barbswatanabe
Created July 23, 2018 01:35
Show Gist options
  • Save barbswatanabe/ec6e0412882943ae360cddf7c71f7ccd to your computer and use it in GitHub Desktop.
Save barbswatanabe/ec6e0412882943ae360cddf7c71f7ccd to your computer and use it in GitHub Desktop.
Zoom with Drag and Drop - Flutter
void _initCamera() async {
File img = await ImagePicker.pickImage(source: ImageSource.camera);
if (img != null) {
setState(() {
_image = img;
});
}
}
void _initGallery() async {
File gallery = await ImagePicker.pickImage(source: ImageSource.gallery);
if (gallery != null) {
setState(() {
_image = gallery;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment