Skip to content

Commit 90e446b

Browse files
committed
fix: packages
1 parent 5ada04e commit 90e446b

3 files changed

Lines changed: 0 additions & 49 deletions

File tree

lib/core/update.dart

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import 'dart:math';
33

44
import 'package:dpip/api/exptech.dart';
55
import 'package:dpip/core/preference.dart';
6-
import 'package:flutter_icmp_ping/flutter_icmp_ping.dart';
7-
import 'package:ip_country_lookup/ip_country_lookup.dart';
86
import 'package:maplibre_gl/maplibre_gl.dart';
97

108
Future<void> updateInfoToServer() async {
@@ -27,41 +25,7 @@ Future<void> updateInfoToServer() async {
2725
coordinates: LatLng(latitude, longitude),
2826
);
2927
}
30-
31-
_performNetworkCheck();
3228
} catch (e) {
3329
print('Network info update failed: $e');
3430
}
3531
}
36-
37-
Future<void> _performNetworkCheck() async {
38-
try {
39-
final countryData = await IpCountryLookup().getIpLocationData();
40-
41-
final ping = Ping('lb.exptech.dev', count: 3, timeout: 3, interval: 1);
42-
final List<int?> lb_ping = await ping.stream
43-
.take(3)
44-
.map((event) => event.response?.time?.inMilliseconds)
45-
.toList();
46-
47-
final ping_dev = Ping(
48-
'lb-dev.exptech.dev',
49-
count: 3,
50-
timeout: 3,
51-
interval: 1,
52-
);
53-
final List<int?> lb_dev_ping = await ping_dev.stream
54-
.take(3)
55-
.map((event) => event.response?.time?.inMilliseconds)
56-
.toList();
57-
58-
await ExpTech().sendNetWorkInfo(
59-
ip: countryData.ip ?? '',
60-
isp: countryData.isp ?? '',
61-
status: lb_ping,
62-
status_dev: lb_dev_ping,
63-
);
64-
} catch (e) {
65-
print('Network check failed: $e');
66-
}
67-
}

pubspec.lock

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -496,15 +496,6 @@ packages:
496496
url: "https://pub.dev"
497497
source: hosted
498498
version: "0.7.0"
499-
flutter_icmp_ping:
500-
dependency: "direct main"
501-
description:
502-
path: "."
503-
ref: "6b9daff"
504-
resolved-ref: "6b9daffb5008f39fa3cf4bb35a1b2c26ab907d63"
505-
url: "https://github.com/ExpTechTW/flutter_icmp_ping.git"
506-
source: git
507-
version: "3.1.3"
508499
flutter_localizations:
509500
dependency: "direct main"
510501
description: flutter

pubspec.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ dependencies:
3636
flutter_compass: ^0.8.1
3737
flutter:
3838
sdk: flutter
39-
flutter_icmp_ping:
40-
git:
41-
url: https://github.com/ExpTechTW/flutter_icmp_ping.git
42-
ref: 6b9daff
4339
flutter_localizations:
4440
sdk: flutter
4541
flutter_markdown: ^0.7.7

0 commit comments

Comments
 (0)