thejoesy
thejoesy

Reputation: 71

Custom Flutter Map Marker with Text

For some time now i have been trying to set markers with the flutter map which not only display an icon but also contain text. I know it would work with the google map but i'm trying to get by with the flutter map.

Can someone please help me?

Upvotes: 0

Views: 1047

Answers (1)

Abhishek kumar
Abhishek kumar

Reputation: 21

You can wrap your icon with a column and add your text with it. Like this:

         Marker(point: LatLng(currLatitude,currLongitude), builder: (context) =>
              Container(child: Column(
                children: [
                  Icon(Icons.location_on,size: 40,),
                  Text("data",style:  TextStyle(fontSize: 12),)
                  ],
                ),
              )
          )

Upvotes: 2

Related Questions