Hard to say without seeing the original. Could you show the plain CardView on screen ? Maybe the difference is caused by padding. Try to comment them out and see what you get.
A key thing to remember is that SwiftUI works by managing view states. with this in mind, everything gets much clearer. Please tell if it doesn't work as intended. Otherwise good continuation and don't forget to close the thread on the correct answer.
yes, the extended form is to have a return keyword. But if there is a single statement with the value to return, you can omit return. You could also use the get format. They are all equivalent.
Hard to say without seeing the original. Could you show the plain CardView on screen ? Maybe the difference is caused by padding. Try to comment them out and see what you get.
A key thing to remember is that SwiftUI works by managing view states. with this in mind, everything gets much clearer. Please tell if it doesn't work as intended. Otherwise good continuation and don't forget to close the thread on the correct answer.
yes, the extended form is to have a return keyword. But if there is a single statement with the value to return, you can omit return. You could also use the get format. They are all equivalent.