feat: double click day cell to create event (#2424)

This commit is contained in:
Richard Shiue 2023-05-03 10:14:12 +08:00 committed by GitHub
parent a48fca159f
commit c4ff1a6290
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,13 +82,16 @@ class CalendarDayCard extends StatelessWidget {
return Container( return Container(
color: backgroundColor, color: backgroundColor,
child: MouseRegion( child: GestureDetector(
cursor: SystemMouseCursors.basic, onDoubleTap: () => onCreateEvent(date),
onEnter: (p) => notifyEnter(context, true), child: MouseRegion(
onExit: (p) => notifyEnter(context, false), cursor: SystemMouseCursors.basic,
child: Padding( onEnter: (p) => notifyEnter(context, true),
padding: const EdgeInsets.only(top: 8.0), onExit: (p) => notifyEnter(context, false),
child: child, child: Padding(
padding: const EdgeInsets.only(top: 8.0),
child: child,
),
), ),
), ),
); );