Awesome icon indicating copy to clipboard operation
Awesome copied to clipboard

How I can dynamic call icon name?

Open Zalarudo opened this issue 3 years ago • 1 comments

How can I use dynamic call icon from a string?

For example I get icon name from server and I need call it from lib

var body: some View{ 
VStack{
  if let faIcon :String = self.data.widgetData[i].icon {
     //faIcon - is icon name like "bomb" or something else
     Awesome.Solid.faIcon.image // here I get error "Type 'Awesome.Solid' has no member 'faIcon'"
  }
}
}

Is any way to solve this point?

Zalarudo avatar May 26 '22 16:05 Zalarudo

Check my PR https://github.com/LiveUI/Awesome/pull/67

klousy92 avatar Jul 13 '22 11:07 klousy92