I'm looking to see if its possible to change the background colour of a cell, but fill it based on a percentage
I'm creating the cell in a List {}
let gradient = LinearGradient(colors: [.green, .white], startPoint: .leading, endPoint: .trailing)
List {
Section(header: Text("Total")) {
Text("Total Obtained: \(totalObtained) - \(totalComplete)%")
.listRowBackground(gradient)
}
}
totalComplete has the percentage variable