I'm working on a side project with SwiftUI, and I have a scenario where I need to show a badge number on one of the tabItems
of my TabView
.
I have everything set with my models, and binding and so on. But I have been looking for 2 days now to find a modifier
to show the badge, but unfortunately all my researches had faced a dead end.
I had went through Apple SwiftUI API Documentation for TabView and searched here on stack overflow and also of course tons of google search results' links.
I'm observing an environment object which hold a list of items and I know how to bind the badge with my items count, so when I have any item update (added, deleted) the badge will be updated. But I'm unable to find a way to show the badge number itself on the tabItem
.
Any help is very appreciated!