I am using SwiftUI and trying to achieve UI like this to support iOS 13.x*, where buttons can be placed dynamically in the grid based on the available space in right side of stack and button size. Any help would be appreciated.

I am using SwiftUI and trying to achieve UI like this to support iOS 13.x*, where buttons can be placed dynamically in the grid based on the available space in right side of stack and button size. Any help would be appreciated.
