Creates an image from a list of bytes.
This function attempts to interpret the given bytes an image. If successful,
the returned Future resolves to the decoded image. Otherwise, the Future
resolves to null
.
Source
Future<ui.Image> decodeImageFromList(Uint8List list) { Completer<ui.Image> completer = new Completer<ui.Image>(); ui.decodeImageFromList(list, (ui.Image image) { completer.complete(image); }); return completer.future; }