this my code to display image
body: ListView.builder(
itemCount: jsonList == null ? 0 : jsonList.length,
itemBuilder: (BuildContext context, int index) {
return ListTile(
leading:Image(image: MemoryImage(base64Decode(base64String))),
trailing: Text(jsonList[index]['pname']
,
style: TextStyle(color: Colors.brown, fontSize: 15),
),
title: Text(jsonList[index]['pdesc']),
);
}),
but end up with this error I/flutter (15439): FormatException: Invalid length, must be multiple of four (at character 256) I/flutter (15439): ...2vt6b997q855/zhVdW9337r3dgewn+fll6e607fqVJ3z/Z3z209deIfeof+fSfytO1CEBCfeR+0 I/flutter (15439):
anybody please help me?
The base64String is wrong, try another and it should work for you. I'll send you an example.