How to create a map of a country that allows me to select its states and take that input

62 Views Asked by At

I´m new on Flutter, currently I´m using a FloatingActionButton that displays a dialog that allows me to select one of the options that I show you in the image, this only boils down to using a list of RadioButtons and only one of them can be selected, but now what I would look for A better experience is to use a country map that allows me to do exactly the same thing (select a state) but this time by tapping on the state section

I would be grateful if you could tell me all the possibilities I have to be able to achieve the above, I found the CustomPainter option but in this case due to the specific form of the countries and states I find it quite tedious to do it this way, perhaps there is some other functionality that allows me use an image of a country and section it internally so that the interaction can be independent or I don't know what other types of solutions can be had in this case.

This is an image of the dialogue that I want to replace:
current dialogue

1

There are 1 best solutions below

0
bqubique On

I have tackled this same behavior on a client app where we had a map and the user could press a section on the map to trigger a callback function/open a screen.

You can use flutter_image_map which has a ROI selection tool that is in its repository. Once you've mapped everything just follow the example where you will be implementing the onPress callbacks depending on the region.