checkDocument method

  1. @override
Future<bool> checkDocument({
  1. required String filePath,
})
override

Check if the path already exists in document folder filePath

Implementation

@override
Future<bool> checkDocument({required String filePath}) async {
  try {
    if (Platform.isWindows)
      return await methodChannel
          .invokeMethod("checkDocument", {"path": filePath});
    else
      return await methodChannel.invokeMethod("checkDocument", filePath);
  } on PlatformException catch (e) {
    throw OpenDocumentException('checkDocument: ${e.stacktrace.toString()}');
  }
}