Back

Expected a value of type 'Uint8List', but got one of type 'File'

  • 0
  • Flutter
  • Web
  • Storage
grab
4 Mar, 2024, 14:42

Hi. I am following example https://appwrite.io/docs/products/storage/upload-download how to get image from storage bucket. This is using flutter. It is showing

TypeScript
Image.memory(snapshot.data)

But Image.memory takes Uint8List as bytes parameter, while done in example snapshot.data returns File.

TL;DR
Developers are trying to display an image from a storage bucket in a Flutter app using Image.memory. The issue is that the example provides File type data instead of the required Uint8List. In this case, developers may need to convert the File into Uint8List before passing it to Image.memory for proper display.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more