open static method

Future<OpenResult> open(
  1. String? filePath, {
  2. String? type,
  3. String? uti,
  4. Uint8List? webData,
})

filePath On web you need to pass the file name to determine the file type linuxDesktopName like 'xdg'/'gnome'

Implementation

static Future<OpenResult> open(String? filePath,
    {String? type,
    String? uti,
    Uint8List? webData}) async {
  Map<String, String?> map = {
    "file_path": filePath!,
    "type": type,
    "uti": uti,
  };
  final result = await _channel.invokeMethod('open_file', map);
  final resultMap = json.decode(result) as Map<String, dynamic>;
  return OpenResult.fromJson(resultMap);
}