overview

A package to use local image, network image and svg file plus customization in google_maps_flutter marker icon.

Get started

Add dependency

dependencies:
  marker_icon: ^0.6.3

Add rounded marker icon with border from network image:

 onPressed: () async {
  markers.add(
  Marker( 
  icon: await MarkerIcon.downloadResizePictureCircle(
  'https://thegpscoordinates.net/photos/la/tehran_iran_5u679ezi8f.jpg',
   size: 150,
   addBorder: true,
   borderColor: Colors.white,
   borderSize: 15),
      ),
     );
   }

Note:

You have to add your marker in an async function.

Functions:

  • svgAsset : a svg icon marker from your asset folder.
  • pictureAsset : a picture(png,jpeg,etc...) icon marker from your asset folder.
  • pictureAssetWithCenterText : a picture(png,jpeg,etc...) icon marker from your asset folder With Center text.
  • circleCanvasWithText : a circle canvas with center text.
  • downloadResizePicture : a picture(png,jpeg,etc...) icon marker from internet.
  • downloadResizePictureCircle : a rounded picture(png,jpeg,etc...) icon marker with border from internet.

Libraries

marker_icon