hungps / flutter_pokedex

Pokedex app built with Flutter (with lots of animations) using Clean Architecture
https://hungps.com
Other
2.31k stars 562 forks source link

Add the possibility to search a pokemon #47

Closed Matttx closed 1 year ago

Matttx commented 2 years ago

Hi again !

I add the possibility to search a Pokemon with the Pokedex SearchBar

Simulator Screen Shot - iPhone 13 - 2021-11-24 at 20 24 11

0x1026 commented 2 years ago

I searched pokemons without download all images from the pokemon list. And there ocurred an exception.

image

Matttx commented 2 years ago

I trying to see how to avoid the innerController?.dispose(); when we are searching a Pokemon but I don't find anything 😕

If someone know how to do that, pls explain me haha

hungps commented 2 years ago

@Matttx Are you interested in adding the search result in the future too? That would be awesome!

Matttx commented 2 years ago

@Matttx Are you interested in adding the search result in the future too? That would be awesome!

It's depending on my schedule, because I have a lot of work to do in this moment, but the project looks really good and It's a pleasure to work on it. Thank you for the proposition 😄

hungps commented 2 years ago

@Matttx Ah it's okay, I'm currently in the same position as yours. It's better if you're the one who will finish the whole task. I will leave the task for you if you're planning to do it yourself. But if you're busy, I will happy to do it or maybe any other contributor wants to do it too 😄

hungps commented 2 years ago

@Matttx I think the result should be shown inside the search bottom sheet. That means we need to create a new state for that and not use the pokemon_list state. And the above bug will not occur anymore

0x1026 commented 2 years ago

@Matttx I think the result should be shown inside the search bottom sheet.

I would prefer to put the search engine at the bottom, so as not to have to duplicate another state of list_pokemon

Only a suggestion ^^

hungps commented 2 years ago

@Hugovidafe That is also nice too, but I want to keep the app look the same as the design so I think the best option is to keep the overall list and the search result separately. And separating things make the code easier to maintain too

Matttx commented 2 years ago

The search can be used to search for multiple Pokemons; for example, searching for "chu", there are several Pokemons... It's just a suggestion ^^

It's already doing this, it's just a spelling mistake haha

Matttx commented 2 years ago

@Hugovidafe That is also nice too, but I want to keep the app look the same as the design so I think the best option is to keep the overall list and the search result separately. And separating things make the code easier to maintain too

I'll do it 😁

Matttx commented 2 years ago

@scitbiz Do I create a new state for the search Pokemon feature or I just add a pokemons search list inside the PokemonListState ?

hungps commented 2 years ago

@Matttx I think you should create a new one because PokemonListState clearly defines what it is doing. And we also need to use another loading and error for it so that the main list doesn't show the loading icon, right?

hungps commented 2 years ago

Hi @Matttx, is this PR ready for review yet? Please turn this PR to Ready for review whenever you are ready!