InteractiveMarker.safe constructor

InteractiveMarker.safe({
  1. required LatLng point,
  2. required Widget child,
  3. Key? key,
  4. double width = 30,
  5. double height = 30,
  6. Alignment? alignment,
  7. bool? rotate,
  8. bool hidden = false,
  9. List<MarkerOptions> options = const [],
})

Creates an InteractiveMarker performing checks on options.

Throws an assertion error in debug mode if duplicate option types are detected.

Implementation

factory InteractiveMarker.safe({
  required LatLng point,
  required Widget child,
  Key? key,
  double width = 30,
  double height = 30,
  Alignment? alignment,
  bool? rotate,
  bool hidden = false,
  List<MarkerOptions> options = const [],
}) {
  _debugAssertNoDuplicateOptionTypes(options);
  return InteractiveMarker(
    point: point,
    child: child,
    key: key,
    width: width,
    height: height,
    alignment: alignment,
    rotate: rotate,
    hidden: hidden,
    options: List<MarkerOptions>.unmodifiable(options),
  );
}