fix: desktop notification not (yet?) supported on macos

This commit is contained in:
Yannick Mauray 2024-06-27 20:48:05 +02:00
parent 02c3a9031a
commit 97f7832c27
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class Downloader extends StatefulWidget {
}
class _DownloaderState extends State<Downloader> {
final notificationsClient = NotificationsClient();
final notificationsClient = Platform.isMacOS ? null : NotificationsClient();
final curlPattern = RegExp("( [0-9.]+%)");
late final Stream<double> _progressStream;
bool _downloadFinished = false;
@ -71,7 +71,7 @@ class _DownloaderState extends State<Downloader> {
controller.close();
setState(() {
_downloadFinished = true;
notificationsClient.notify(
notificationsClient?.notify(
_cancelled
? context.t('Download cancelled')
: context.t('Download complete'),