openDocument method Null safety

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

open document filePath

Implementation

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