fromMarker static method

InteractiveMarker fromMarker(
  1. Marker marker
)

Converts a standard Marker to an InteractiveMarker.

If marker is already an InteractiveMarker, it is returned as-is. Otherwise, a new InteractiveMarker is created with the same properties.

Implementation

static InteractiveMarker fromMarker(Marker marker) {
  return marker is InteractiveMarker
      ? marker
      : InteractiveMarker(
          key: marker.key,
          point: marker.point,
          child: marker.child,
          width: marker.width,
          height: marker.height,
          alignment: marker.alignment,
          rotate: marker.rotate,
        );
}