I want to display HEIC / HEIF image from my gallery using Image.memory. But it show error like this everytime I select .heic file. It works fine in .jpg or .jpeg.
here is my code for selecting the file
Uint8List? pickedPhotoFile;
FilePickerResult? selectedFile;
Future<void> selectFile() async {
selectedFile = await FilePicker.platform.pickFiles(type: FileType.any);
if (selectedFile != null) {
pickedPhotoFile = selectedFile!.files.single.bytes;
}
setState(() {});
}
And this is how i display the image
Image.memory(
pickedPhotoFile!,
width: 150,
height: 150,
fit: BoxFit.contain,
);
Any help would be appreciated