Skip to content

Commit

Permalink
fix analyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
git-elliot committed Nov 12, 2024
1 parent e5e9d13 commit ede13f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion integration_test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void main() {
WidgetKey.amazonChip.key,
WidgetKey.appleChip.key,
WidgetKey.cloudflareChip.key,
WidgetKey.youtubeChip.key
WidgetKey.youtubeChip.key,
];

final googleChip = find.byKey(chips[Random().nextInt(5)]);
Expand Down
13 changes: 0 additions & 13 deletions lib/pages/network_troubleshoot/port_scan_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:async';

import 'package:flutter/material.dart';
import 'package:network_tools_flutter/network_tools_flutter.dart';
import 'package:percent_indicator/percent_indicator.dart';
import 'package:vernet/helper/port_desc_loader.dart';
import 'package:vernet/main.dart';
import 'package:vernet/models/port.dart';
Expand All @@ -27,8 +26,6 @@ class _PortScanPageState extends State<PortScanPage>
with SingleTickerProviderStateMixin {
final Set<OpenPort> _openPorts = {};

double _progress = 0;

final TextEditingController _targetIPEditingController =
TextEditingController();
final TextEditingController _singlePortEditingController =
Expand All @@ -51,14 +48,6 @@ class _PortScanPageState extends State<PortScanPage>
.showSnackBar(SnackBar(content: Text(message)));
}

void _handleProgress(double progress) {
if (mounted) {
setState(() {
_progress = progress;
});
}
}

void _handleEvent(ActiveHost? host) {
debugPrint('Found open port : ${host!.openPorts}');
setState(() {
Expand Down Expand Up @@ -100,7 +89,6 @@ class _PortScanPageState extends State<PortScanPage>
.customDiscover(
_targetIPEditingController.text,
timeout: Duration(milliseconds: appSettings.socketTimeout),
progressCallback: _handleProgress,
async: true,
)
.listen(_handleEvent, onDone: _handleOnDone);
Expand All @@ -111,7 +99,6 @@ class _PortScanPageState extends State<PortScanPage>
startPort: int.parse(_startPortEditingController.text),
endPort: int.parse(_endPortEditingController.text),
timeout: Duration(milliseconds: appSettings.socketTimeout),
progressCallback: _handleProgress,
async: true,
)
.listen(_handleEvent, onDone: _handleOnDone);
Expand Down

0 comments on commit ede13f5

Please sign in to comment.