add method

void add(
  1. Marker marker, {
  2. int index = -1,
})

Add a marker to this collection.

The optional index parameter inserts the marker at a specific position; by default the marker is appended to the end of the collection.

Parameters

  • marker: The Marker instance to add.
  • index: Optional insert position. Use -1 to append (default).

Implementation

void add(final Marker marker, {final int index = -1}) {
  objectMethod(pointerId, 'MarkerCollection', 'add', args: marker.pointerId);
}