DropdownMenu with flags using compose?

Issue

I am trying to create a dropdown menu using flags but not sure exactly how to do this. I am familiar with creating a simple dropdown menu but how would I go about doing so with flags ? Does kotlin have a built in library or something similar with all flags or do I need to use retrofit ? Any tips are appreciated!

I am thinking of something similar to this: https://gyazo.com/5517b0a51218f32c58fe21ab1ae373a5

Solution

Update 2022.08.02

I managed to solve this issue. This might not be the most optimal method to do it but it works relatively well!

To save your time, you can download my project from github:

https://github.com/JosefMG2022/FlagTesting

Hope this help! Feel free to improve it and modify it on your own.
Also, if you find a better solution to this problem, feel free to post it here for everyone!

Happy Coding!

Answered By – Josef M

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published