revert win toast to 0.0.2
This commit is contained in:
parent
81d62a06e3
commit
90625eacb5
|
@ -38,8 +38,10 @@ class WindowsNotificationManager implements NotificationsManager {
|
||||||
WindowsNotificationManager(Future<void> Function(String, int) notificationSelectConvo) {
|
WindowsNotificationManager(Future<void> Function(String, int) notificationSelectConvo) {
|
||||||
this.notificationSelectConvo = notificationSelectConvo;
|
this.notificationSelectConvo = notificationSelectConvo;
|
||||||
scheduleMicrotask(() async {
|
scheduleMicrotask(() async {
|
||||||
//initialized = await WinToast.instance().initialize(clsid: 'cwtch', displayName: 'Cwtch', aumId: 'Open Privacy Research Society', iconPath: '');
|
initialized = await WinToast.instance().initialize(appName: 'cwtch', productName: 'Cwtch', companyName: 'Open Privacy Research Society');
|
||||||
// initialize toast with you aumId, displayName and iconPath
|
/*
|
||||||
|
* WinToast 0.3.0 code for when we can compile it
|
||||||
|
*
|
||||||
var init = await WinToast.instance().initialize(
|
var init = await WinToast.instance().initialize(
|
||||||
aumId: 'OpenPrivacyResearchSociety.Cwtch',
|
aumId: 'OpenPrivacyResearchSociety.Cwtch',
|
||||||
displayName: 'Cwtch',
|
displayName: 'Cwtch',
|
||||||
|
@ -56,7 +58,7 @@ class WindowsNotificationManager implements NotificationsManager {
|
||||||
/* it failed, is ok, may have been 'close'? */
|
/* it failed, is ok, may have been 'close'? */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
initialized = true;
|
initialized = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -65,6 +67,20 @@ class WindowsNotificationManager implements NotificationsManager {
|
||||||
if (initialized && !globalAppState.focus) {
|
if (initialized && !globalAppState.focus) {
|
||||||
if (!active) {
|
if (!active) {
|
||||||
active = true;
|
active = true;
|
||||||
|
WinToast.instance().clear();
|
||||||
|
final toast = await WinToast.instance().showToast(
|
||||||
|
type: ToastType.text01, title: message);
|
||||||
|
toast?.eventStream.listen((event) {
|
||||||
|
if (event is ActivatedEvent) {
|
||||||
|
WinToast.instance().bringWindowToFront();
|
||||||
|
}
|
||||||
|
active = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WinToast 0.3.0 code for when we can compile it
|
||||||
|
*
|
||||||
WinToast.instance().clear();
|
WinToast.instance().clear();
|
||||||
await WinToast.instance().showToast(
|
await WinToast.instance().showToast(
|
||||||
toast: Toast(
|
toast: Toast(
|
||||||
|
@ -90,7 +106,7 @@ class WindowsNotificationManager implements NotificationsManager {
|
||||||
]),
|
]),
|
||||||
]));
|
]));
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -924,10 +924,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: win_toast
|
name: win_toast
|
||||||
sha256: "371d62b17b30489cad41e831e6340c2777202d2b4b2fd55a14ffc566b3df7518"
|
sha256: "6349ef17a487d2ebf9caa51da1cb5a325f4cd7e5a601935ced456f3c00d1e64f"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.0.2"
|
||||||
window_manager:
|
window_manager:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -44,7 +44,11 @@ dependencies:
|
||||||
url_launcher: ^6.0.18
|
url_launcher: ^6.0.18
|
||||||
window_manager: ^0.3.2
|
window_manager: ^0.3.2
|
||||||
# notification plugins
|
# notification plugins
|
||||||
win_toast: ^0.3.0
|
## Somewhere between 0.0.2 and 0.3 they introduced a dependancy on a new Windows RT feature
|
||||||
|
## Which can only be linked to with a new VC 17 compiler and we're suspicious only work on
|
||||||
|
## Windows 2022 and newer... we can't seem to automate compiling on win server 2019 containers
|
||||||
|
## So pinning to 0.0.2 for the forseeable future or until we change plugins
|
||||||
|
win_toast: ^0.0.2
|
||||||
flutter_local_notifications: ^14.0.0+2
|
flutter_local_notifications: ^14.0.0+2
|
||||||
dbus: ^0.7.8
|
dbus: ^0.7.8
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
|
|
Loading…
Reference in New Issue