closePDF static method

Future<bool> closePDF()

Closes the currently open PDF viewer

Returns a Future that completes with true if the viewer was closed successfully, or throws a PlatformException if there was an error or no viewer was open.

Implementation

static Future<bool> closePDF() async {
  try {
    return await _channel.invokeMethod('closePDF');
  } on PlatformException catch (e) {
    print('Error closing PDF viewer: ${e.message}');
    return false;
  }
}