setComponentProperties function Null safety
Set properties to Figma2Flutter element referenced by it's name
Implementation
void setComponentProperties(String name, String props, [int index = 0]) {
Map<String, dynamic> properties = jsonDecode(props);
var elems = getElementsByName(name, index + 1);
if (index < elems.length) {
elems[index].widget?.setState(() {
elems[index].widget?.properties = properties;
});
}
}