I have set a condition to load an SFsymbol.
Image(systemname : isShowList ? "ellipsis" : "")
But I am getting a warning No symbol named ''
How can I set this to an empty value without warning?
CodePudding user response:
It might depend on what is needed in common layout, but possible variants are
a) remove image conditionally
if isShowList {
Image(systemName : "ellipsis")
}
b) hide image conditionally
Image(systemName : "ellipsis")
.opacity(isShowList ? 1.0 : 0.0)
