ImageMapRegion.fromRect constructor

ImageMapRegion.fromRect({
  1. required Rect rect,
  2. Color? color,
  3. String? title,
  4. String? link,
})

Implementation

factory ImageMapRegion.fromRect({
  required Rect rect,
  Color? color,
  String? title,
  String? link,
}) {
  return ImageMapRegion(
    shape: ImageMapShape.rect,
    path: Path()..addRect(rect),
    color: color ?? Colors.transparent,
    title: title,
    link: link,
  );
}