简体   繁体   English

Flutter 图像小部件:如何将图像小部件转换为字节数组

[英]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 小部件中获取字节?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM