Skip to content

Commit

Permalink
Merge pull request lpongetti#175 from enricostrijks/master
Browse files Browse the repository at this point in the history
Repair buildOnHover parameter, remove hoverOnTap
  • Loading branch information
lpongetti authored Sep 7, 2023
2 parents a262db2 + ec2b063 commit ebf1729
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/src/marker_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@ class MarkerWidget extends StatelessWidget {
final VoidCallback onTap;
final Function(bool)? onHover;
final bool buildOnHover;
final Function()? hoverOnTap;

MarkerWidget({
required this.marker,
required this.onTap,
this.onHover,
this.buildOnHover = false,
this.hoverOnTap,
}) : super(key: marker.key ?? ObjectKey(marker.marker));

@override
Widget build(BuildContext context) {
final m = marker.builder(context);
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: hoverOnTap ?? onTap,
child: onHover != null
onTap: onTap,
child: buildOnHover && onHover != null
? MouseRegion(
onEnter: (_) => onHover!(true),
onExit: (_) => onHover!(false),
Expand Down

0 comments on commit ebf1729

Please sign in to comment.