This code is the solution for Codelab in Training Course - Android Basics with Compose, Unit 6: Data persistence, PATHWAY 3, Project: Create a flight search app.
Link to Codelab: Project: Create a Flight Search app
Consider this solution as one way to implement the app.
Flight Search is an app in which users enter an airport and can view a list of destinations using that airport as a departure.
- Provide a text field for the user to enter an airport name or International Air Transport Association (IATA) airport identifier.
- Query the database to provide autocomplete suggestions as the user types.
- When the user chooses a suggestion, generate a list of available flights from that airport, including the IATA identifier and airport name to other airports in the database.
- Let the user save favorite individual routes.
- When no search query is entered, display all the user-selected favorite routes in a list.
- Save the search text with Preferences DataStore. When the user reopens the app, the search text, if any, needs to prepopulate the text field with appropriate results from the database.
Prepopulated database is provided for this project.
- Download and run the app.
