custom_map_markers icon indicating copy to clipboard operation
custom_map_markers copied to clipboard

on tap of marker

Open vivekdhameliya2 opened this issue 3 years ago • 5 comments

https://user-images.githubusercontent.com/64520575/165264795-69272738-904d-4847-a009-9b61e4520e9b.mov

hello when I use a custom marker and. when I clicked on that particular market at that time my all markers a rebuilt. so how to solve this issue

vivekdhameliya2 avatar Apr 26 '22 09:04 vivekdhameliya2

image Use one boolean make it false initially and while you tap on marker change that boolean to true. Use that same boolean and show visibility of the result accordingly.

Eg. RxBool showData = false.obs; onTap: () { showData.value = true; // onTap of marker } showData.value == false ? const SizedBox() : Positioned( bottom: 10, left: 15, right: 15, child: //show your result here )

You can refer above image.

rlaheri99 avatar May 04 '22 05:05 rlaheri99

how did you put on tap on the markers? I really want that

loisenjoki avatar Jun 07 '23 17:06 loisenjoki

I also want to know how can i put on tap on the markers.? :(

kessler428 avatar Jun 28 '23 21:06 kessler428

You can add onTap functionality by adding the below lines

MarkerData(

                      marker: Marker(
                      
                          markerId: MarkerId(markerId),
                          position: position,
                          onTap: (){ 
                          
                          **// Here you can implement on marker tap**
                          
                          }
                      ),
                      child: Container() // Your Custom Widget Here,
                  )

AhmedAlbashaDev avatar Oct 14 '23 16:10 AhmedAlbashaDev

same problem for me

WieFel avatar Jan 29 '24 11:01 WieFel