mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-01 20:58:00 +02:00
This commit introduces search functionality and airport selection to the StationsScreen. Users can now search for airports and select an origin airport, which will be displayed in a compact view. Key changes: - Added a search bar (`OutlinedTextField`) to `StationsScreen` to filter the list of airports. - Implemented `searchQuery` StateFlow in `StationsScreenViewModel` to hold the current search term. - Updated `originAirportsUiState` to filter airports based on the `searchQuery`. - Added `selectedOriginAirport` StateFlow in `StationsScreenViewModel` to manage the selected airport. - Introduced `AirportInfoCompact` composable to display the selected origin airport. - Implemented `onAirportSelected` and `clearSelectedAirport` functions in `StationsScreenViewModel` to handle airport selection and clearing. - Added `BackHandler` to clear the selected airport when the back button is pressed. - Made `AirportInfoItem` clickable to trigger airport selection. - Added string resource for "Search airports" placeholder. - Added Detekt configuration files for `domain/stations` and `ui/stations` modules. - Added Lint baseline files for `domain/stations` and `ui/stations` modules. - Used `key` and `animateItem` for better performance and animations in `LazyColumn`.