1

I would like to make a Hero animation between a marker displayed on the map and a detail page.

The problem is the marker is not a Widget and can not be wrapped by a Hero object.

Is there a workaround / solution ?

fvisticot
  • 7,936
  • 14
  • 49
  • 79

1 Answers1

-1

Those are default markers .You can create custom widgets for Markers also.There you can wrap your widget with Hero tag.You can see this link how to create custom marker widget google maps flutter.

Guru Prasad mohapatra
  • 1,809
  • 13
  • 19
  • Not so simple. The link you provide explains how to create a BitmapDescriptor (kind of image) from a widget. This "image" of the widget is then used for the icon property of the marker. – fvisticot Dec 29 '19 at 09:22
  • @fviscot that is right. You can't really do it with GoogleMaps since markers aren't widgets, but static bitmaps. You could probably fake it: when the user clicks on a marker, put the real marker widget over a marker position and after one-frame-delay start hero animation. I cannot provide the code, this is just an idea. – JoKr Jan 02 '20 at 12:07
  • It can be done, Hero animation stuff, but the real problem is that Google Maps may not bet ready (loaded) at the moment of the animation. So, so you me might find a blank screen. – Gauris Javier May 03 '21 at 01:28