Skip to content

How I can dynamic call icon name?  #64

@Zalarudo

Description

@Zalarudo

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions