showEventModal method

  1. @override
Future<void> showEventModal(
  1. String eventId,
  2. int? timestamp, {
  3. bool edit = false,
})
override

Shows a calendar event in a modal dialog.

eventId is the event identifier. timestamp is the occurrence timestamp in milliseconds for recurring events. edit opens the native editor directly. When false, opens the native view screen, which is still not read-only: on both platforms the user can edit the event from there. edit only controls the modal's starting mode.

On iOS, presents EKEventViewController (view) or EKEventEditViewController (edit). On Android, fires ACTION_VIEW or ACTION_EDIT.

Implementation

@override
Future<void> showEventModal(String eventId, int? timestamp,
    {bool edit = false}) async {
  await methodChannel.invokeMethod<void>(
    'showEventModal',
    <String, dynamic>{
      'eventId': eventId,
      'timestamp': timestamp,
      'edit': edit,
    },
  );
}