sendNative method
Sends a native OS notification.
On macOS uses osascript, on Linux uses notify-send.
Falls back silently on unsupported platforms.
Implementation
Future<void> sendNative(String title, String body) async {
try {
if (Platform.isMacOS) {
await Process.run('osascript', [
'-e',
'display notification "$body" with title "$title"',
]);
} else if (Platform.isLinux) {
await Process.run('notify-send', [title, body]);
}
// Windows and others: no-op for now.
} catch (_) {
// Best effort.
}
}