setComponentImageUrl function Null safety
Sets network image url
to be displayed in the element referenced by it's Figma name
Only works on Figma nodes that contain Image fill
Implementation
void setComponentImageUrl(String name, String url, [int index = 0]) {
var elems = getElementsByName(name, index + 1);
if (index < elems.length) {
elems[index].widget?.setState(() {
elems[index].widget?.image = Image.network(url);
});
}
}