Skip to content

Commit c7e7916

Browse files
committed
Merge branch main into development
1 parent f5f79a8 commit c7e7916

6 files changed

Lines changed: 35 additions & 20 deletions

File tree

.github/workflows/quality.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ jobs:
1111
with:
1212
flutter-version: ${{ env.FLUTTER_VERSION }}
1313
- run: flutter pub get
14-
- run: flutter format --set-exit-if-changed .
14+
- run: dart format --set-exit-if-changed .
1515
- run: flutter analyze
1616
- name: Run Dart Code Metrics
17-
run: |
1817
dart pub global activate dart_code_metrics
1918
dart pub global run dart_code_metrics:metrics analyze lib

lib/pages/apps/apps_list_item.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class AppListItem extends StatelessWidget {
3737
borderRadius: BorderRadius.circular(10),
3838
boxShadow: [
3939
BoxShadow(
40-
color: Colors.grey.withAlpha((255 * 0.2).toInt()),
40+
color: Colors.grey.withValues(alpha: 0.2),
4141
blurRadius: 10,
4242
offset: const Offset(0, 1),
4343
),
@@ -113,7 +113,7 @@ class AppListItem extends StatelessWidget {
113113
if (!isEnabled)
114114
Container(
115115
decoration: BoxDecoration(
116-
color: Colors.grey.withAlpha((255 * 0.2).toInt()),
116+
color: Colors.grey.withValues(alpha: 0.4),
117117
borderRadius: BorderRadius.circular(10),
118118
),
119119
),

lib/pages/main/main_btn.dart

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'dart:async';
2-
import 'dart:developer' as dev;
2+
import 'dart:developer';
33
import 'package:flutter/material.dart';
44
import 'package:vpn_client/design/colors.dart';
55
import 'package:vpn_client/design/dimensions.dart';
@@ -148,18 +148,34 @@ class MainBtnState extends State<MainBtn> with SingleTickerProviderStateMixin {
148148
// Disconnect
149149
///flutterV2ray.stopV2Ray();
150150
151-
///
151+
// Get Server Delay
152+
log('${flutterV2ray.getServerDelay(config: parser.getFullConfiguration())}ms');
153+
154+
// Permission is not required if you using proxy only
155+
if (await flutterV2ray.requestPermission()){
156+
flutterV2ray.startV2Ray(
157+
remark: parser.remark,
158+
// The use of parser.getFullConfiguration() is not mandatory,
159+
// and you can enter the desired V2Ray configuration in JSON format
160+
config: parser.getFullConfiguration(),
161+
blockedApps: null,
162+
bypassSubnets: null,
163+
proxyOnly: false,
164+
);
165+
}
166+
167+
// Disconnect
168+
///flutterV2ray.stopV2Ray();
169+
170+
///
152171
153172
//TODO:move to right place
154173
// =======
155174
//
156175
// >>>>>>> Stashed changes
157176
VPNclientEngine.pingServer(subscriptionIndex: 0, index: 1);
158177
VPNclientEngine.onPingResult.listen((result) {
159-
dev.log(
160-
"Ping result: ${result.latencyInMs} ms",
161-
name: 'PingLogger',
162-
); // <- Use dev.log instead of print.(It build to log meta data)
178+
log("Ping result: ${result.latencyInMs} ms");
163179
});
164180

165181
///final result = await platform.invokeMethod('startVPN');

lib/pages/servers/servers_list_item.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ServerListItem extends StatelessWidget {
4141
borderRadius: BorderRadius.circular(10),
4242
boxShadow: [
4343
BoxShadow(
44-
color: Colors.grey.withAlpha((255 * 0.2).toInt()),
44+
color: Colors.grey.withValues(alpha: 0.2),
4545
blurRadius: 10,
4646
offset: const Offset(0, 1),
4747
),

lib/search_dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class _SearchDialogState extends State<SearchDialog> {
193193
borderRadius: BorderRadius.circular(10),
194194
boxShadow: [
195195
BoxShadow(
196-
color: Colors.grey.withAlpha((255 * 0.2).toInt()),
196+
color: Colors.grey.withValues(alpha: 0.2),
197197
blurRadius: 10,
198198
offset: const Offset(0, 1),
199199
),

pubspec.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ packages:
1313
dependency: transitive
1414
description:
1515
name: archive
16-
sha256: "7dcbd0f87fe5f61cb28da39a1a8b70dbc106e2fe0516f7836eb7bb2948481a12"
16+
sha256: a7f37ff061d7abc2fcf213554b9dcaca713c5853afa5c065c44888bc9ccaf813
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "4.0.5"
19+
version: "4.0.6"
2020
args:
2121
dependency: transitive
2222
description:
@@ -167,10 +167,10 @@ packages:
167167
dependency: "direct main"
168168
description:
169169
name: flutter_svg
170-
sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b
170+
sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1
171171
url: "https://pub.dev"
172172
source: hosted
173-
version: "2.0.17"
173+
version: "2.1.0"
174174
flutter_test:
175175
dependency: "direct dev"
176176
description: flutter
@@ -361,10 +361,10 @@ packages:
361361
dependency: transitive
362362
description:
363363
name: posix
364-
sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
364+
sha256: f0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62
365365
url: "https://pub.dev"
366366
source: hosted
367-
version: "6.0.1"
367+
version: "6.0.2"
368368
provider:
369369
dependency: "direct main"
370370
description:
@@ -385,10 +385,10 @@ packages:
385385
dependency: transitive
386386
description:
387387
name: shared_preferences_android
388-
sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad"
388+
sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac"
389389
url: "https://pub.dev"
390390
source: hosted
391-
version: "2.4.8"
391+
version: "2.4.10"
392392
shared_preferences_foundation:
393393
dependency: transitive
394394
description:

0 commit comments

Comments
 (0)