Files
android-challange-adrian-kuta/ui
Adrian Kuta 504f798bd3 feat: Implement airport search and selection in StationsScreen
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`.
2025-06-15 23:41:00 +02:00
..