checkDocument method Null safety

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

check if the path already exists in document folder filePath

Implementation

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