rwbr / flutter_neat_and_clean_calendar

Simple and clean flutter calendar with ability to slide up/down to show weekly/monthly calendar. Forked from [flutter_clean_calender](https://pub.dev/packages/flutter_clean_calendar)
MIT License
104 stars 51 forks source link

onEventSelected event is only triggered if you click directly on a text in the ListTile #46

Closed m-gug closed 1 year ago

m-gug commented 1 year ago

Hello! We just switched from flutter_clean_calendar to your fork and noticed that in contrast to clean_calendar here the onEventSelected event is only triggered if you click directly on a text in the ListTile. If you click on an empty area in the row, the event is not triggered.

image

As far as I could determine, the reason for this is probably the switch to the GestureDetector: https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/9ea7b8f1fcd12d348dc32b41773aa118be657984/lib/flutter_neat_and_clean_calendar.dart#L612

I was able to fix the problem by adding behavior: HitTestBehavior.opaque, to the GestureDetector (https://api.flutter.dev/flutter/rendering/HitTestBehavior.html), not sure if that fits. I will create a PR for that, maybe you can have look at it.

rwbr commented 1 year ago

Seems like a possible solution for that problem. Thank you for your contribution.

rwbr commented 1 year ago

Closed with #47