getNetImage method

Future<Image> getNetImage(
  1. String url,
  2. {dynamic width,
  3. dynamic height}
)

Implementation

static Future<ui.Image> getNetImage(String url, {width, height}) async {
  var data = await NetworkAssetBundle(Uri.parse(url)).load(url);
  var codec = await ui.instantiateImageCodec(data.buffer.asUint8List(),
      targetWidth: width, targetHeight: height);
  var fi = await codec.getNextFrame();
  return fi.image;
}