You can create a custom row view for the list in SwiftUI and get the desired result. Here is an example code:
main.swift562 chars26 linesIn the above code, CustomRowView is a reusable row view with two text views, one aligned to the left and one aligned to the right with a spacer in-between. The foregroundColor modifier is used to set the primary and secondary colors. In ContentView, the List is using CustomRowView to create the rows.
You can customize the row view as per your requirement.
gistlibby LogSnag