Generic Event coming from the native side of Maps.
All MapEvents contain the
mapId that originated the event. This should
<T> on this event represents the type of the
value that is
contained within the event.
This class is used as a base class for all the events that might be triggered from a Map, but it is never used directly as an event type.
Do NOT instantiate new events like
MapEvent<ValueType>(mapId, val) directly,
use a specific class instead:
class NewEvent extend MapEvent<ValueType> when creating your own events.
See below for examples:
These events are more semantic and pleasant to use than raw generics. They
can be (and in fact, are) filtered by the
(See MethodChannelGoogleMapsFlutter.onCameraMoveStarted, for example)
If your event needs a
position, alongside the
extends _PositionedMapEvent<ValueType> instead. This adds a
If your event only needs a
extend MapEvent<LatLng>. The former lets consumers of these
events to access the
.position property, rather than the more generic
yielded from the latter.