How to use SVG markers in google_maps_flutter Flutter plugin

In this example, I will share how to use SVG markers in google_maps_flutter Flutter plugin. First, create a function that will give you a BitmapDescriptor from the asset. Make sure the asset is declared in your pubspec file.

I instantiated a Map object at the start of my app so that I could use the BitmapDescriptors without using a lot of async/await calls.

data_model.dart

main.dart

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Editorial Staff

Editorial Staff at FreeWebMentor is a team of professional developers.