getPathDocument method Null safety

Future<String> getPathDocument(
  1. {required String folderName}
)

take path from folder folderName return path

Implementation

Future<String> getPathDocument({required String folderName}) async {
  try {
    if (Platform.isWindows)
      return await getPathFolderWindows(folder: folderName);
    else
      return await methodChannel.invokeMethod("getPathDocument");
  } on PlatformException catch (e) {
    throw OpenDocumentException(
        'getPathDocument: ${e.stacktrace.toString()}');
  }
}