findDesktopFile method

Future<File?> findDesktopFile(
  1. String filename
)

Tries to resolve path from a ./desktop filename. Only checks the ~/.local/share/applications folder.

Implementation

Future<File?> findDesktopFile(String filename) async {
  final File file = File(
    getDesktopFilePath(
      ProtocolScheme(
        scheme: filename.replaceFirst(RegExp(r'\.desktop$'), ''),
      ),
    ),
  );
  return await file.exists() ? file : null;
}