Created
September 11, 2022 06:16
-
-
Save nbnD/9f582dc932ada75c6f38940394611191 to your computer and use it in GitHub Desktop.
Image picker in flutter
This file contains 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
Future pickImageFromGallery() async { | |
XFile? pickedImage = await picker.pickImage(source: ImageSource.gallery); | |
setState(() { | |
File? file = File(pickedImage!.path); | |
List<File?> fileList.add(file); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment