openDocument method Null safety

Future<void> openDocument(
  1. {required String filePath}
)

open document filePath

Implementation

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