Open Street Map Search by Places and Pick | Flutter Package | With Modal Bottom Sheet

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I'm back with another video of this starter package uh Ben street map search and Peak uh you will see a lot of changes um in this package uh after the update of 0.0 point 12. this package actually offers you both uh autocomplete first and also click any location by dragging in the map so this basically uses the openstreetmaps API so this is totally free to use uh not like Google Google Maps apis that requires a few payments and you must need a credit card to use Google API but in that case uh as I am I have used uh open street map apis so you will not need any credit card or you will not need to pay any money for that let's and also thanks for 1.2k views on my previous video on this same widget package okay now uh as per many requests uh today I will tell you uh another example but uh I will be uh using a model bottom sheet to pick a location by this package okay okay let's uh create a flutter project first I will use this directory to open to create a new flutter project flutter V8 I will name this um osm test two okay enter it's creating project running upgrade in or some test two yeah hold on where it is I cannot find my project yeah I got this i got this right click on it uh show more options open with code oh my project is ready yes code is ready let's get into the code let's create another dot file name it for some form dot start let's delete this I will not need this anymore I get rid of this so and I will create a new Deadpool wizard I will name this home and all this here now I will not return any container I will return a scaffold default this transition is coming from the Google go by GitHub go pilot you can try this this is if you have any irrigation or email from your full college or university then you can use GitHub copilot totally free I am also using my University webmail well now let's get the open street map starts and Peak paste it here you can click this button here to get that get yeah we are ready we have successfully added uh for our open state level that your project now let's uh here let's pick the suggestion um either with that position no problem at all let's call the let's read that documentation here well I would like to copy copy that first paste it here and then copy that to and paste it here all right this is the center where uh default Center location um this is the button color this will change all the buttons of this widget and this is the button text you can customize this too and this is the on pick method in the on pick method you can uh do anything with the create location in the pitch location that you picked from the from this widget well uh first let's print in this data Dot that long dot attitude longitude and then address uh today I will not actually do this thing I told you I would like to Implement a model bottom sheet oh okay let's implement the model bottom sheet or our bottom sheet uh it will return with that so let's trim the method so model it will later build context as a parameter is suggesting something I will not pick that here I have some error so yeah that will be important because I'm not returning anything from here and in the body uh let me Define a container suggesting something but I will not eat everything I will call Inkwell and in a child that's called uh location well I'll use the variable here patient address uh Define I will Define this here brain pick location and then I will Define the um sorry on that method here I will call the model method oh let's run this let's see if everything is correct after run the Chrome error preparation has started successfully let's click on the peak location yeah it's working perfectly well let's customize this I would like to wrap this with Center sorry wrong button pressed and it is now at Center now let's customize the model button sheet uh child I don't need any color here now delete this and paste it so let's run this again we load this location yeah that's working perfectly but the height is little bit short so let's define height and give it 600 let's run this I think this is okay well now you can click any location by dragging or or you can also first for your edit like I am interesting for dildo I got a submission here like this it will take me to that address you can also zoom in zoom out and this button actually will take you to the to this location okay I'm pressing this it will take me to that location you can uh you can change this to get to another location uh I am again searching for killgo now let's take this uh nothing is happening because I haven't done anything with the big data well in the Big Data method I'll first of the model bottom sheet it is for copying the model bottom sheet and then I will set a state and change the location address foreign [Music] I need to Define this method inside a class now I will be able to use the set method here I will change the location address with the big data address now let's run this again click location uh I will search for material let's taken any one of them at the location yeah here you can see I got a location here well now if you want to find the find this address after clicking on that in the map then let's see what to do to that let's I will now Define two double variables one for latitude and one for longitude and I will pass this to here longitude and after adding the on pick method I will change the latitude and longitude with the peak values now let's reload this let's pick a location first I will pick Library is showing only one solution let's take this that current location you can see and the location is selected and the address is showing here let's click on this text and now you can see uh your previously selected location here okay I can again change or change this location by money comps let's pick the first one let's set the current location here you go uh you are showing us seeing the address that you selected let's click on this and your on your previously selected location all right um that all for today please subscribe to our channel to see more videos like this thank you happy coding hello
Info
Channel: Niharon Technologies
Views: 4,969
Rating: undefined out of 5
Keywords:
Id: kZRrH3UlxeU
Channel Id: undefined
Length: 16min 19sec (979 seconds)
Published: Thu Sep 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.