openCustom function

Future<void> openCustom(
  1. String path, {
  2. String? customLocation,
})

Implementation

Future<void> openCustom(
  String path, {
  String? customLocation,
}) async {
  if (customLocation != null) {
    return await openPath(path);
  }
  if (Platform.isMacOS) {
    await Process.run(
      "open",
      ['-a $customLocation', path],
      runInShell: true,
    );
  } else {
    await Process.run(
      customLocation!,
      [path],
      runInShell: true,
    );
  }
}