requestSync method

  1. @override
Future<bool> requestSync(
  1. CalendarAccount account
)
override

Implementation

@override
Future<bool> requestSync(CalendarAccount account) async {
  if (Platform.isIOS) return true;
  try {
    final map = {
      'accountName': account.accountName,
      'accountType': account.accountType,
    };
    final result = await methodChannel.invokeMethod<int>('requestSync', map);
    return result == 1;
  } on Exception catch (e) {
    if (kDebugMode) {
      print(e.toString());
    }
  }
  return false;
}