'Flutter Using NetworkImage on an AssetImage Field

With the map library I'm using in flutter app development, I am trying to display a marker image with a cdn url. The problem is that the image type that the Marker class requires is a class called OverlayImage (you can check it out in a link here: https://github.com/note11g/flutter_naver_map/blob/main/lib/src/overlay_image.dart) which takes in an AssetImage class only, but I have to use a NetworkImage in order to use online url.

So, I think the best is to find a way to convert NetworkImage to AssetImage which I am not even sure is possible since they are sibling classes. For now, when I pass a url to OverlayImage, it does not display anything due to the aforementioned problem. If converting to AssetImage doesn't work, then I think I might have to customize the library for my specific usage.

Any suggestions or problem analysis would help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source