addPhoto method

void addPhoto(
  1. int index,
  2. String photoBase64
)

Marker'a fotoğraf ekler

index - Marker'ın index'i photoBase64 - Base64 encoded fotoğraf string'i

Not: Her marker maksimum 3 fotoğraf içerebilir.

Implementation

void addPhoto(int index, String photoBase64) {
  if (index >= 0 && index < markers.length) {
    if (markers[index].photos == null) {
      markers[index].photos = [];
    }
    if (markers[index].photos!.length < 3) {
      markers[index].photos!.add(photoBase64);
      markers.refresh();
    }
  }
}