find method
Used to get the application path of the scheme if its already registered.
Implementation
@override
Future<String?> find(ProtocolScheme scheme) async {
final String? filename = await findDesktopFileWithScheme(scheme);
if (filename != null) {
final File? file = await findDesktopFile(filename);
if (file != null) {
final String content = await file.readAsString();
try {
return RegExp(r'^Exec=([^%u\n]+)', multiLine: true)
.firstMatch(content)
?.group(1);
} catch (_) {}
}
}
}