Home > other >  Flutter : How to display data:image/jpeg;base64
Flutter : How to display data:image/jpeg;base64

Time:05-04

Hello everyone i try display this image data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=

in my flutter app using

image.network()

but its format is not supported

how can I display it ?

CodePudding user response:

import 'dart:convert';
import 'package:image/image.dart' as ImageProcess;

final _byteImage = Base64Decoder().convert(base64Image);
Widget image = Image.memory(_byteImage)
  • Related