Actually pickImage() is deprecated now. So you have to use ImagePicker.getImage(source: ImageSource.gallery)
void getImage(ImageSource imageSource) async { PickedFile imageFile = await picker.getImage(source: imageSource); if (imageFile == null) return; File tmpFile = File(imageFile.path); final appDir = await getApplicationDocumentsDirectory(); final fileName = basename(imageFile.path); localFiletmpFile = await tmpFile.copy('${appDir.path}/$fileName'); setState(() { _image = localFile;tmpFile; }); } The code also store image file in device directory. Path pacakage is also used.
