This project uses the API from https://pokeapi.co/ to perform calls.
The way the problem was approached
The App consists of two different screens and each one of them is into a separate feature: List and Detail.
Consists of a Screen of all the Pokemons retrieved by the API, the flow works in the following manner: It will perform a call to the API with the first 20 Pokemon, which right after will be saved on disk for easy access in the future.
Every time the Search Button is clicked two possible things can happen
If the Pokemon being searched was already retrieved by the API, it will be on disk and the search will give priority to the data coming from DB, this way is possible to search for partial strings.
If the button is pressed with an empty text it will perform a search of the initial 20 Pokemons from the API
If the Pokemon being searched is not on the DB it will search for it at the API, however, due to the API behavior is necessary to write the complete name of the Pokemon in this scenario.
Upon clicking on the Pokemon the user is redirected to the Detail page.
On the detail page, the user will be shown some information about the pokemon and be able to set it as a favorite or not. If the Pokemon is set as favorite but a search for the server is triggered the data will be overwritten in the DB, this is on purpose
Android: Kotlin, Jetpack Compose, Room, Kotlin Courotines, Kotlin Flow, Retrofit, Gson