[英]Flutter Image Widget: How to convert the Image widget to Byte array
I am trying to use a network image as marker icon in google maps api.我正在尝试在谷歌地图 api 中使用网络图像作为标记图标。 The google maps Marker accepts only the BitmapDescriptor as icon, so how do I convert my network image as icon?
谷歌地图标记只接受 BitmapDescriptor 作为图标,那么如何将我的网络图像转换为图标?
BitmapDescriptor.fromBytes constructor accepts the bytes, how do I get the bytes from the Image widget? BitmapDescriptor.fromBytes 构造函数接受字节,我如何从 Image 小部件中获取字节?
Have you tried anything from here?你从这里尝试过什么吗?
https://coletiv.com/blog/use-network-images-as-marker-icons-flutter-google-maps/ https://coletiv.com/blog/use-network-images-as-marker-icons-flutter-google-maps/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.