onInteraction method

  1. @override
void onInteraction(
  1. Marker item,
  2. InteractionType type
)
override

Handle interaction side-effects (e.g., internal model callbacks).

Implementation

@override
void onInteraction(Marker item, InteractionType type) {
  if (item is InteractiveMarker) {
    switch (type) {
      case InteractionType.tap:
        item.gestureOptions?.onTap?.call();
        break;
      case InteractionType.hover:
        item.gestureOptions?.onHover?.call();
        break;
      case InteractionType.longPress:
        item.gestureOptions?.onLongPress?.call();
        break;
      case InteractionType.active:
        item.gestureOptions?.onActive?.call();
        break;
    }
  }
}