SwiftUI listItemTint

Suppose you compose a number of sidebar items using SwiftUI's Outlinegroup:

Code Block swift
 OutlineGroup(section.children ?? [], children: \.children) { item in
ItemRow(item)
}

View Modifier .listItemTint(.yellow) on the OutlineGroup applies to all of the items in thet group. One cannot use .listItemTint on ItemRow.

How to tint just one of the child items with a particular color?




SwiftUI listItemTint
 
 
Q