openFile function

Future<void> openFile(
  1. String filePath
)

Opens a file from the given file path using the default application.

This is the platform-specific implementation for mobile and desktop platforms (when dart:io is available). The file is opened using the platform's default application for that file type via openfilex.

Parameters:

  • filePath: The path of the file to open

Throws:

  • May throw exceptions if the file cannot be opened.

Implementation

Future<void> openFile(String filePath) async {
  await OpenFilex.open(filePath);
}