Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting a byte array to image in Flutter?

Tags:

flutter

I want to get a image from my REST API service however haven't found any documentation on how to decode the response body that would be a byte array to an image in Flutter? Anyone with some useful resources, please help...

like image 809
StackDrenny Avatar asked Mar 23 '19 13:03

StackDrenny


Video Answer


1 Answers

Use this for your image widget: Image.memory(bytes) . You can find more documentation here: https://docs.flutter.io/flutter/widgets/Image/Image.memory.html

like image 150
C-Spydo Avatar answered Oct 01 '22 09:10

C-Spydo