@@ -151,15 +151,17 @@ class VPN {
151151 }
152152
153153 Future <void > _onFailerConnect () async {
154- final connectionNotifier = _container? .read (connectionStateProvider.notifier);
154+ final connectionNotifier =
155+ _container? .read (connectionStateProvider.notifier);
155156
156157 connectionNotifier? .setError ();
157158 await _vpnBridge.disconnectVpn ();
158159 vibrationService.vibrateError ();
159160 }
160161
161162 Future <void > _onSuccessConnect () async {
162- final connectionNotifier = _container? .read (connectionStateProvider.notifier);
163+ final connectionNotifier =
164+ _container? .read (connectionStateProvider.notifier);
163165 final connectionState = _container? .read (connectionStateProvider);
164166 if (connectionState? .status != ConnectionStatus .analyzing) {
165167 return ;
@@ -194,14 +196,14 @@ class VPN {
194196 }
195197
196198 Future <void > _closeTunnel () async {
197- final connectionNotifier = _container? .read (connectionStateProvider.notifier);
199+ final connectionNotifier =
200+ _container? .read (connectionStateProvider.notifier);
198201 if (Platform .isIOS) {
199202 await _vpnBridge.disconnectVpn ();
200203 }
201204 connectionNotifier? .setDisconnected ();
202205 }
203206
204-
205207 Future <void > _onTunnelClosed () async {
206208 final connectionNotifier =
207209 _container? .read (connectionStateProvider.notifier);
@@ -212,7 +214,8 @@ class VPN {
212214
213215 Future <bool ?> _grantVpnPermission () async {
214216 switch (Platform .operatingSystem) {
215- case 'android' :
217+ case "android" :
218+ case "windows" :
216219 return await _vpnBridge.grantVpnPermission ();
217220 case "ios" :
218221 return await _vpnBridge.connectVpn ();
@@ -224,6 +227,7 @@ class VPN {
224227 Future <void > _createTunnel () async {
225228 switch (Platform .operatingSystem) {
226229 case 'android' :
230+ case "windows" :
227231 await _vpnBridge.connectVpn ();
228232 break ;
229233 case "ios" :
@@ -282,8 +286,7 @@ class VPN {
282286 Future <void > getVPNStatus () async {
283287 final connectionNotifier =
284288 _container? .read (connectionStateProvider.notifier);
285- final isTunnelRunning =
286- await _vpnBridge.isTunnelRunning ();
289+ final isTunnelRunning = await _vpnBridge.isTunnelRunning ();
287290 if (isTunnelRunning) {
288291 connectionNotifier? .setConnected ();
289292 } else {
0 commit comments