Now comes the part where we add the ability to filter courses. After all, users will want to see only the courses that they are interested in. We’ve already added a button
We’ll begin by creating a FilterWidget that will hold each filter value for the FilterPage.
Then we’ll build out the FilterPage itself.
Next we’ll see how to persist the filter choice to your app’s storage using a library called SharedPreferences.
Finally, we’ll use the filter choice the user has made to filter the list of courses shown on the CoursesPage.
In the process of this, you’ll understand how we can persist state between widgets. Let get started.