First, add the image_picker Flutter package as a dependency by adding the following line in your pubspec. yaml file. Now write the function for pick image from Gallery. The optional parameter imageQuality accepts any value between 0 to 100, you can adjust it according to the size and quality required by your app.
Read moreHow do you upload pictures to Flutter?
To upload image in Flutter there are multiple way to upload image through flutter we can use http library . Here is full source code to upload image in flutter. And second one is Dio package we can use dio package to upload image.
Read more