I have an Image object from dart:ui. How can I display it in my app with a FutureBuilder?
import 'dart:ui' as ui;
...
Future<ui.Image> makeImage() async {
// Code for generating the Image.
}
...
Container(width: 600, height: 200, child: FutureBuilder<ui.Image>(
future: makeImage(),
builder: (BuildContext context, AsyncSnapshot<ui.Image> snapshot) {
if (snapshot.hasData) {
return Image.memory(?????????????);
}
else {
return Text("waiting");
}
}),),