mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-01 21:47:59 +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`.
33 lines
810 B
YAML
33 lines
810 B
YAML
# Exceptions for compose. See https://detekt.dev/docs/introduction/compose
|
|
naming:
|
|
FunctionNaming:
|
|
functionPattern: '[a-zA-Z][a-zA-Z0-9]*'
|
|
|
|
TopLevelPropertyNaming:
|
|
constantPattern: '[A-Z][A-Za-z0-9]*'
|
|
|
|
complexity:
|
|
LongParameterList:
|
|
ignoreAnnotated: ['Composable']
|
|
TooManyFunctions:
|
|
ignoreAnnotatedFunctions: ['Preview']
|
|
|
|
style:
|
|
MagicNumber:
|
|
ignorePropertyDeclaration: true
|
|
ignoreCompanionObjectPropertyDeclaration: true
|
|
ignoreAnnotated: ['Composable']
|
|
|
|
UnusedPrivateMember:
|
|
ignoreAnnotated: ['Composable']
|
|
|
|
# Deviations from defaults
|
|
formatting:
|
|
TrailingCommaOnCallSite:
|
|
active: true
|
|
autoCorrect: true
|
|
useTrailingCommaOnCallSite: true
|
|
TrailingCommaOnDeclarationSite:
|
|
active: true
|
|
autoCorrect: true
|
|
useTrailingCommaOnDeclarationSite: true |