openDocument method

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

Open the document by the indicated path filePath,

Implementation

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