Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ginkgo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vjrj
ginkgo
Commits
e5dc7246
Commit
e5dc7246
authored
1 year ago
by
vjrj
Browse files
Options
Downloads
Patches
Plain Diff
Disable VPN check on web
parent
a3ee9b20
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ui/widgets/connectivity_widget_wrapper_wrapper.dart
+17
-16
17 additions, 16 deletions
lib/ui/widgets/connectivity_widget_wrapper_wrapper.dart
with
17 additions
and
16 deletions
lib/ui/widgets/connectivity_widget_wrapper_wrapper.dart
+
17
−
16
View file @
e5dc7246
...
@@ -91,27 +91,28 @@ class ConnectivityWidgetWrapperWrapper extends ConnectivityWidgetWrapper {
...
@@ -91,27 +91,28 @@ class ConnectivityWidgetWrapperWrapper extends ConnectivityWidgetWrapper {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
FutureBuilder
<
bool
>(
return
kIsWeb
future:
CheckVpnConnection
.
isVpnActive
(),
?
super
.
build
(
context
)
builder:
(
BuildContext
context
,
AsyncSnapshot
<
bool
>
snapshot
)
{
:
FutureBuilder
<
bool
>(
if
(
snapshot
.
hasData
&&
snapshot
.
data
!=
null
)
{
future:
CheckVpnConnection
.
isVpnActive
(),
final
bool
isVpnActive
=
snapshot
.
data
!
;
builder:
(
BuildContext
context
,
AsyncSnapshot
<
bool
>
snapshot
)
{
if
(
isVpnActive
)
{
if
(
snapshot
.
hasData
&&
snapshot
.
data
!=
null
)
{
return
child
;
final
bool
isVpnActive
=
snapshot
.
data
!
;
}
else
{
if
(
isVpnActive
)
{
return
super
.
build
(
context
);
return
child
;
}
}
else
{
}
else
{
return
super
.
build
(
context
);
return
super
.
build
(
context
);
}
}
}
else
{
});
return
super
.
build
(
context
);
}
});
}
}
// This package does not work in IOS so we just return true
// This package does not work in IOS so we just return true
// Also does not detect well in web production mode
// Also does not detect well in web production mode
static
Future
<
bool
>
get
isConnected
async
{
static
Future
<
bool
>
get
isConnected
async
{
final
bool
vpn
=
await
CheckVpnConnection
.
isVpnActive
();
if
(
!
kIsWeb
&&
await
CheckVpnConnection
.
isVpnActive
())
{
if
(
vpn
)
{
return
true
;
return
true
;
}
}
return
kIsWeb
||
isIOS
return
kIsWeb
||
isIOS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment