Skip to content

Commit 49a7fb4

Browse files
committed
Fix flutter analyze issues
This commit is replacing print with log in lib/pages/main/main_btn.dart
1 parent fd8db29 commit 49a7fb4

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

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.withOpacity(0.2),
40+
color: Colors.grey.withValues(alpha: 0.2),
4141
blurRadius: 10,
4242
offset: const Offset(0, 1),
4343
),
@@ -112,7 +112,7 @@ class AppListItem extends StatelessWidget {
112112
if (!isEnabled)
113113
Container(
114114
decoration: BoxDecoration(
115-
color: Colors.grey.withOpacity(0.4),
115+
color: Colors.grey.withValues(alpha: 0.4),
116116
borderRadius: BorderRadius.circular(10),
117117
),
118118
),

lib/pages/main/main_btn.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'dart:async';
2+
import 'dart:developer';
23
import 'package:flutter/material.dart';
34
import 'package:vpn_client/design/colors.dart';
45
import 'package:vpn_client/design/dimensions.dart';
@@ -111,7 +112,7 @@ V2RayURL parser = FlutterV2ray.parseFromURL(link);
111112

112113

113114
// Get Server Delay
114-
print('${flutterV2ray.getServerDelay(config: parser.getFullConfiguration())}ms');
115+
log('${flutterV2ray.getServerDelay(config: parser.getFullConfiguration())}ms');
115116

116117
// Permission is not required if you using proxy only
117118
if (await flutterV2ray.requestPermission()){
@@ -137,7 +138,7 @@ if (await flutterV2ray.requestPermission()){
137138
// >>>>>>> Stashed changes
138139
VPNclientEngine.pingServer(subscriptionIndex: 0, index: 1);
139140
VPNclientEngine.onPingResult.listen((result) {
140-
print("Ping result: ${result.latencyInMs} ms");
141+
log("Ping result: ${result.latencyInMs} ms");
141142
});
142143

143144

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.withOpacity(0.2),
44+
color: Colors.grey.withValues(alpha: 0.2),
4545
blurRadius: 10,
4646
offset: const Offset(0, 1),
4747
),

lib/search_dialog.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class _SearchDialogState extends State<SearchDialog> {
174174
borderRadius: BorderRadius.circular(10),
175175
boxShadow: [
176176
BoxShadow(
177-
color: Colors.grey.withOpacity(0.2),
177+
color: Colors.grey.withValues(alpha: 0.2),
178178
blurRadius: 10,
179179
offset: const Offset(0, 1),
180180
),
@@ -356,4 +356,4 @@ class _SearchDialogState extends State<SearchDialog> {
356356
),
357357
);
358358
}
359-
}
359+
}

0 commit comments

Comments
 (0)