Fintasys / emoji_picker_flutter

A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.
MIT License
155 stars 115 forks source link

It loses its state on every parent setState() #32

Closed rocboronat closed 2 years ago

rocboronat commented 2 years ago

Hello!

We went on beta (join it if you want hihi) and found a new issue. When the parent of the picker calls setState(), the emoji picker loses its state and goes back to the first page.

Do you know any quick way to fix it? Or should we change the emoji picker itself and release a new version?

Here's an example that showcases the issue. In this case, when we scroll the list, we call a setState() to show or hide the FAB. Now I'm going to do it with a ValueNotifier to avoid that setState() only for a part of the screen, but well, the issue is there.

EmojiPickerIssue2

As usual, thanks for the plugin and the support! ๐Ÿ‘

Fintasys commented 2 years ago

That doesn't look good ๐Ÿ˜… Which version are you using? Did you also try current master?

rocboronat commented 2 years ago

We are on 1.0.7 and nope, didn't try current master :ยทD

Fintasys commented 2 years ago

@rocboronat Would you consider to give it a try? I couldn't reproduce the issue on my side as far as I understood it. Would be helpful if you could test it with master or make a sample to reproduce the issue ๐Ÿ™‡ by the way I've checked your app and it looks great, glad to see my widget being used :)

rocboronat commented 2 years ago

Haha! Good news! After building the sample project I realized that moving from 1.0.7 to master just fixes the issue ๐Ÿ˜„

In case it helps you in any way (which I doubt, haha!) here's the sample: https://github.com/rocboronat/emoji_picker_flutter_issue

So... moving QuitNow to master! If you want, we can test it on production (๐Ÿคซ๐Ÿคซ๐Ÿคซ) and give you a green light to release a new version ๐Ÿ˜„

Fintasys commented 2 years ago

Oh glad to hear that ๐Ÿ˜ Also thx for providing the sample, it might come handy at others times / bugs. I'm thinking of releasing current state as new version soon ๐Ÿค” If I can get some confirmation I would of course feel much safer tho ๐Ÿคฃ

rocboronat commented 2 years ago

Hey! Hi again! ๐Ÿ‘‹ I think b42052ea6bafc0fc8ab27e77b9f8994a86d030d3 totally fixes the issue. Oh, and we have it released to the 100% of our users and nobody said anything bad about the keyboard. So I think you can be confident it works as expectet, hehehe! Thanks a lot, @Fintasys ๐Ÿ˜„