getImage static method
Drawing requires the use of ui.Image object, converted by this method
Implementation
static Future<Image> getImage(String asset) async {
ByteData data =
await rootBundle.load("packages/adv_flutter_weather/$asset");
Codec codec = await instantiateImageCodec(data.buffer.asUint8List());
FrameInfo fi = await codec.getNextFrame();
return fi.image;
}