installDesktopFile method

Future<void> installDesktopFile(
  1. String path,
  2. ProtocolScheme scheme
)

Used to install a .desktop file. Recommended to pass path from getDesktopFilePath to path.

Implementation

Future<void> installDesktopFile(String path, ProtocolScheme scheme) async =>
    Process.run(
      'xdg-mime',
      <String>['default', path, 'x-scheme-handler/${scheme.scheme}'],
    );