@@ -77,11 +77,11 @@ class AppBloc with AppSystemTray {
7777
7878 void onAddLeakItemClick () async {
7979 if (_leakInput == null || _leakInput? .trim ().isEmpty == true ) {
80- WinToast . instance (). showToast (type : ToastType .text01, title : 'No input entered!' );
80+ _showToast ( 'No input entered!' );
8181 return ;
8282 }
8383 if ((await AppSharedPreferences .leakChecklist).contains (_leakInput)) {
84- WinToast . instance (). showToast (type : ToastType .text01, title : 'Repetitive input not allowed!' );
84+ _showToast ( 'Repetitive input not allowed!' );
8585 return ;
8686 }
8787 await AppSharedPreferences .addToLeakChecklist (_leakInput! );
@@ -224,6 +224,10 @@ class AppBloc with AppSystemTray {
224224 }
225225
226226 Future <void > _checkProxySettings () async {
227+ if (Platform .isMacOS) {
228+ // todo: implement macOS
229+ return ;
230+ }
227231 final localNetwork = await AppCmd .getLocalNetworkInfo ();
228232 _localNetwork.value = localNetwork;
229233 final proxyResult = await AppCmd .getProxySettings ();
@@ -259,12 +263,20 @@ class AppBloc with AppSystemTray {
259263 }
260264
261265 if (remaining < 1073741824 && lowBalanceToastCount < 2 ) {
262- WinToast . instance (). showToast (type : ToastType .text01, title : 'Less than 1 GB is left in your kerio account!' );
266+ _showToast ( 'Less than 1 GB is left in your kerio account!' );
263267 await AppSharedPreferences .setKerioLowBalanceToastCount (lowBalanceToastCount + 1 );
264268 await AppSharedPreferences .setKerioLowBalanceToastDate (today.toIso8601String ());
265269 }
266270 }
267271
272+ void _showToast (String title) {
273+ if (Platform .isMacOS) {
274+ // todo: implement macOS
275+ return ;
276+ }
277+ WinToast .instance ().showToast (type: ToastType .text01, title: title);
278+ }
279+
268280 void _checkNetworkConnectivity () async {
269281 final result = await (Connectivity ().checkConnectivity ());
270282 if (result == ConnectivityResult .none) {
0 commit comments