addEvent method

  1. @override
Future<bool> addEvent(
  1. CalendarEvent event
)
override

Implementation

@override
Future<bool> addEvent(CalendarEvent event) async {
  try {
    final result =
        await methodChannel.invokeMethod<int>('addEvent', event.toJson());
    return result == 1;
  } on Exception catch (e) {
    if (kDebugMode) {
      print(e.toString());
    }
  }
  return false;
}