open function

Future<bool> open(
  1. String pathOrUri, {
  2. String? mimeType,
})

Implementation

Future<bool> open(String pathOrUri, {String? mimeType}) async {
  if (await UFilesChannel.open(pathOrUri, mimeType: mimeType)) return true;
  if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) return launchUrl(Uri.file(pathOrUri));
  return false;
}