From c4ff1a62903428cdf7f9d19367c54d92cf07281e Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Wed, 3 May 2023 10:14:12 +0800 Subject: [PATCH] feat: double click day cell to create event (#2424) --- .../calendar/presentation/calendar_day.dart | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart b/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart index 32994cc06a..ad1161e950 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart @@ -82,13 +82,16 @@ class CalendarDayCard extends StatelessWidget { return Container( color: backgroundColor, - child: MouseRegion( - cursor: SystemMouseCursors.basic, - onEnter: (p) => notifyEnter(context, true), - onExit: (p) => notifyEnter(context, false), - child: Padding( - padding: const EdgeInsets.only(top: 8.0), - child: child, + child: GestureDetector( + onDoubleTap: () => onCreateEvent(date), + child: MouseRegion( + cursor: SystemMouseCursors.basic, + onEnter: (p) => notifyEnter(context, true), + onExit: (p) => notifyEnter(context, false), + child: Padding( + padding: const EdgeInsets.only(top: 8.0), + child: child, + ), ), ), );