How do you get a SwiftData Query to change its attributes / parameters interactively? In this lesson we'll show how you can use a Picker view in SwiftUI to send selections to a View, and have that View respond to the interaction by selectively initializing a Query with different .sort, ..order, and .filter / #Predicate parameters. We'll also learn to use _variableName to initialize a Swift Property Wrapper. Part of Prof. Gallaugher's Zero to Full Stack SwiftUI University course, which you can find, free, at https://bit.ly/prof-g-swiftui.
The video lesson just before this is at: • SwiftData! Updating a Simple ToDo List App...
The starter code for this lesson can be found at:
https://github.com/gallaugher/ToDoLis...
And you can find the shoutout Swifters I mentioned:
/ flowritescode
/ @stewartlynch
And StackOverflow Swifter: https://stackoverflow.com/users/69369...
Hack on!