diff --git a/README.md b/README.md index 1d17c6f0..32bdc5fd 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Vernet - Network Analyzer and Monitoring Tool | Android | iOS | macOS | Linux | Windows | |-----------|-----|-------|-------|---------| -|Get it on F-droidGet it on Google Play| Build Ready |Get it on GitHub Releases|Get it on GitHub Releases| Get it on GitHub Releases| +|Get it on F-droidGet it on Google Play| Works on emulator |Get it on GitHub Releases|Get it on GitHub Releases| Get it on GitHub Releases| ## How to install @@ -48,7 +48,7 @@ Note: macOS build hasn't been notarized yet. ## Contributors Required -1. Windows Tester +1. Linux/Windows Tester 2. Documenter Drop mail at fs0c19ty@protonmail.com diff --git a/android/app/build.gradle b/android/app/build.gradle index d882d72e..6f8019ea 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -40,7 +40,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "org.fsociety.vernet" - minSdkVersion 16 + minSdkVersion 19 targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/android/build.gradle b/android/build.gradle index 4d7a7a82..c228417f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.9.10' repositories { google() jcenter() @@ -24,6 +24,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/fastlane/metadata/android/en-US/changelogs/16.txt b/fastlane/metadata/android/en-US/changelogs/16.txt new file mode 100644 index 00000000..1d117bba --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/16.txt @@ -0,0 +1,2 @@ +Upgraded network_tools to v4.0.1 +Mac address support added for Desktop \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 751c0ea2..b5b82252 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,46 +1,59 @@ PODS: - Flutter (1.0.0) + - flutter_icmp_ping (0.0.1): + - Flutter + - flutter_isolate (0.0.1): + - Flutter - network_info_plus (0.0.1): - Flutter - package_info_plus (0.4.5): - Flutter - - permission_handler_apple (9.0.4): + - permission_handler_apple (9.1.1): - Flutter - - shared_preferences_ios (0.0.1): + - shared_preferences_foundation (0.0.1): - Flutter + - FlutterMacOS - url_launcher_ios (0.0.1): - Flutter DEPENDENCIES: - Flutter (from `Flutter`) + - flutter_icmp_ping (from `.symlinks/plugins/flutter_icmp_ping/ios`) + - flutter_isolate (from `.symlinks/plugins/flutter_isolate/ios`) - network_info_plus (from `.symlinks/plugins/network_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) EXTERNAL SOURCES: Flutter: :path: Flutter + flutter_icmp_ping: + :path: ".symlinks/plugins/flutter_icmp_ping/ios" + flutter_isolate: + :path: ".symlinks/plugins/flutter_isolate/ios" network_info_plus: :path: ".symlinks/plugins/network_info_plus/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" permission_handler_apple: :path: ".symlinks/plugins/permission_handler_apple/ios" - shared_preferences_ios: - :path: ".symlinks/plugins/shared_preferences_ios/ios" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_icmp_ping: 2b159955eee0c487c766ad83fec224ae35e7c935 + flutter_isolate: 0edf5081826d071adf21759d1eb10ff5c24503b5 network_info_plus: b78876159360f5580608c2cea620d6ceffabd0ad package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e - permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce - shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad - url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de + permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 + shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 88510b3b..9cf1d843 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -161,7 +161,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -222,10 +222,12 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -236,6 +238,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a3..a6b826db 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ com.apple.developer.networking.wifi-info + UIApplicationSupportsIndirectInputEvents + diff --git a/lib/main.dart b/lib/main.dart index 3d699e1a..91eacbc4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:network_tools_flutter/network_tools_flutter.dart'; +import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; import 'package:vernet/api/update_checker.dart'; import 'package:vernet/helper/app_settings.dart'; @@ -13,6 +15,8 @@ late AppSettings appSettings; Future main() async { configureDependencies(Env.prod); WidgetsFlutterBinding.ensureInitialized(); + final appDocDirectory = await getApplicationDocumentsDirectory(); + await configureNetworkTools(appDocDirectory.path, enableDebugging: true); final bool allowed = await ConsentLoader.isConsentPageShown(); appSettings = AppSettings.instance..load(); diff --git a/lib/pages/base_page.dart b/lib/pages/base_page.dart index 445aebf8..60e0dc27 100644 --- a/lib/pages/base_page.dart +++ b/lib/pages/base_page.dart @@ -34,7 +34,7 @@ abstract class BasePage extends State { _getDomainChip('youtube.com'), _getDomainChip('apple.com'), _getDomainChip('amazon.com'), - _getDomainChip('cloudflare.com') + _getDomainChip('cloudflare.com'), ], ), ), @@ -95,7 +95,7 @@ abstract class BasePage extends State { buildPopularChips(), Expanded( child: buildResults(context), - ) + ), ], ), ), diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 745ce03a..4ffac460 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -139,7 +139,7 @@ class _WifiDetailState extends State { }, icon: const Icon(Icons.radar), label: const Text('Scan open ports'), - ) + ), ], ), ], @@ -180,7 +180,7 @@ class _WifiDetailState extends State { }, icon: const Icon(Icons.find_replace), label: const Text('Reverse Lookup'), - ) + ), ], ), ], @@ -226,7 +226,7 @@ class _WifiDetailState extends State { child: Text(snapshot.data!.location.address), ), const SizedBox(height: 5), - const Divider(height: 3) + const Divider(height: 3), ], ); } diff --git a/lib/pages/host_scan_page/device_in_the_network.dart b/lib/pages/host_scan_page/device_in_the_network.dart index 0e9c8399..7e9c61c5 100644 --- a/lib/pages/host_scan_page/device_in_the_network.dart +++ b/lib/pages/host_scan_page/device_in_the_network.dart @@ -2,7 +2,7 @@ import 'dart:io'; import 'package:dart_ping/dart_ping.dart'; import 'package:flutter/material.dart'; -import 'package:network_tools/network_tools.dart'; +import 'package:network_tools_flutter/network_tools_flutter.dart'; /// Contains all the information of a device in the network including /// icon, open ports and in the future host name and mDNS name @@ -10,17 +10,25 @@ class DeviceInTheNetwork { /// Create basic device with default (not the correct) icon DeviceInTheNetwork({ required this.internetAddress, - required this.make, + required Future makeVar, required this.pingData, + MdnsInfo? mdnsVar, + String? mac, this.iconData = Icons.devices, this.hostId, - }); + }) { + make = makeVar; + _mdns = mdnsVar; + _mac = mac; + } /// Create the object from active host with the correct field and icon factory DeviceInTheNetwork.createFromActiveHost({ required ActiveHost activeHost, required String currentDeviceIp, required String gatewayIp, + required String? mac, + MdnsInfo? mdns, }) { return DeviceInTheNetwork.createWithAllNecessaryFields( internetAddress: activeHost.internetAddress, @@ -29,6 +37,8 @@ class DeviceInTheNetwork { pingData: activeHost.pingData, currentDeviceIp: currentDeviceIp, gatewayIp: gatewayIp, + mdns: mdns, + mac: mac, ); } @@ -40,6 +50,8 @@ class DeviceInTheNetwork { required PingData pingData, required String currentDeviceIp, required String gatewayIp, + required MdnsInfo? mdns, + required String? mac, }) { final IconData iconData = getHostIcon( currentDeviceIp: currentDeviceIp, @@ -52,22 +64,49 @@ class DeviceInTheNetwork { hostIp: internetAddress.address, gatewayIp: gatewayIp, hostMake: make, + mdns: mdns, ); return DeviceInTheNetwork( internetAddress: internetAddress, - make: deviceMake, + makeVar: deviceMake, pingData: pingData, hostId: hostId, iconData: iconData, + mdnsVar: mdns, + mac: mac, ); } /// Ip of the device final InternetAddress internetAddress; - final Future make; + late Future make; + String? _mac; + final PingData pingData; final IconData iconData; + MdnsInfo? _mdns; + + MdnsInfo? get mdns { + return _mdns; + } + + String get mac => _mac == null ? '' : '($_mac)'; + + set mdns(MdnsInfo? name) { + _mdns = name; + + final Future deviceMake = getDeviceMake( + currentDeviceIp: '', + hostIp: internetAddress.address, + gatewayIp: '', + hostMake: make, + mdns: _mdns, + ); + make = deviceMake; + } + + /// Some name to show the user String? hostId; static Future getDeviceMake({ @@ -75,11 +114,14 @@ class DeviceInTheNetwork { required String hostIp, required String gatewayIp, required Future hostMake, + required MdnsInfo? mdns, }) { if (currentDeviceIp == hostIp) { return Future.value('This device'); } else if (gatewayIp == hostIp) { return Future.value('Router/Gateway'); + } else if (mdns != null) { + return Future.value(mdns.mdnsDomainName); } return hostMake; } diff --git a/lib/pages/host_scan_page/host_scna_bloc/host_scan_bloc.dart b/lib/pages/host_scan_page/host_scna_bloc/host_scan_bloc.dart index de2ea25f..c410bcb7 100644 --- a/lib/pages/host_scan_page/host_scna_bloc/host_scan_bloc.dart +++ b/lib/pages/host_scan_page/host_scna_bloc/host_scan_bloc.dart @@ -1,12 +1,10 @@ import 'dart:async'; import 'package:bloc/bloc.dart'; -import 'package:flutter/material.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:injectable/injectable.dart'; -import 'package:isolate_contactor/isolate_contactor.dart'; import 'package:network_info_plus/network_info_plus.dart'; -import 'package:network_tools/network_tools.dart'; +import 'package:network_tools_flutter/network_tools_flutter.dart'; import 'package:vernet/main.dart'; import 'package:vernet/pages/host_scan_page/device_in_the_network.dart'; @@ -30,7 +28,10 @@ class HostScanBloc extends Bloc { String? subnet; /// List of all ActiveHost devices that got found in the current scan - List activeHostList = []; + List deviceInTheNetworkList = []; + + /// mDNS for each ip + Map mDnsDevices = {}; Future _initialized( Initialized event, @@ -44,135 +45,99 @@ class HostScanBloc extends Bloc { add(const HostScanEvent.startNewScan()); } - @Deprecated("Now network_tools support running scan inside isolate") - // ignore: unused_element - Future _startNewScan( + Future _startNewScanBuiltInIsolate( StartNewScan event, Emitter emit, ) async { - const int scanRangeForIsolate = 51; - for (int i = appSettings.firstSubnet; - i <= appSettings.lastSubnet; - i += scanRangeForIsolate + 1) { - final IsolateContactor isolateContactor = - await IsolateContactor.createOwnIsolate(startSearchingDevices); - int limit = i + scanRangeForIsolate; - if (limit >= appSettings.lastSubnet) { - limit = appSettings.lastSubnet; - } - isolateContactor.sendMessage([ - subnet!, - i.toString(), - limit.toString(), - ]); - await for (final dynamic message in isolateContactor.onMessage) { - try { - if (message is ActiveHost) { - final DeviceInTheNetwork tempDeviceInTheNetwork = - DeviceInTheNetwork.createFromActiveHost( - activeHost: message, + MdnsScanner.searchMdnsDevices() + .then((List activeHostList) async { + for (final ActiveHost activeHost in activeHostList) { + final int index = indexOfActiveHost(activeHost.address); + final MdnsInfo? mDns = await activeHost.mdnsInfo; + if (mDns == null) { + continue; + } + + if (index == -1) { + deviceInTheNetworkList.add( + DeviceInTheNetwork.createFromActiveHost( + activeHost: activeHost, currentDeviceIp: ip!, gatewayIp: gatewayIp!, - ); - - activeHostList.add(tempDeviceInTheNetwork); - activeHostList.sort((a, b) { - final int aIp = int.parse( - a.internetAddress.address - .substring(a.internetAddress.address.lastIndexOf('.') + 1), - ); - final int bIp = int.parse( - b.internetAddress.address - .substring(b.internetAddress.address.lastIndexOf('.') + 1), - ); - return aIp.compareTo(bIp); - }); - emit(const HostScanState.loadInProgress()); - emit(HostScanState.foundNewDevice(activeHostList)); - } else if (message is String && message == 'Done') { - isolateContactor.dispose(); - } - } catch (e) { - emit(const HostScanState.error()); + mdns: mDns, + mac: (await activeHost.arpData)?.macAddress, + ), + ); + } else { + deviceInTheNetworkList[index] = deviceInTheNetworkList[index] + ..mdns = mDns; } - } - } - debugPrint('The end of the scan'); - // emit(HostScanState.loadSuccess(activeHostList)); - } + deviceInTheNetworkList.sort(sort); - Future _startNewScanBuiltInIsolate( - StartNewScan event, - Emitter emit, - ) async { - final streamController = HostScanner.getAllPingableDevicesAsync( + emit(const HostScanState.loadInProgress()); + emit(HostScanState.foundNewDevice(deviceInTheNetworkList)); + } + }); + + final streamController = HostScannerFlutter.getAllPingableDevices( subnet!, firstHostId: appSettings.firstSubnet, lastHostId: appSettings.lastSubnet, ); await for (final ActiveHost activeHost in streamController) { - final DeviceInTheNetwork tempDeviceInTheNetwork = + final int index = indexOfActiveHost(activeHost.address); + + if (index == -1) { + deviceInTheNetworkList.add( DeviceInTheNetwork.createFromActiveHost( - activeHost: activeHost, - currentDeviceIp: ip!, - gatewayIp: gatewayIp!, - ); - - activeHostList.add(tempDeviceInTheNetwork); - activeHostList.sort((a, b) { - final int aIp = int.parse( - a.internetAddress.address - .substring(a.internetAddress.address.lastIndexOf('.') + 1), + activeHost: activeHost, + currentDeviceIp: ip!, + gatewayIp: gatewayIp!, + mac: (await activeHost.arpData)?.macAddress, + ), ); - final int bIp = int.parse( - b.internetAddress.address - .substring(b.internetAddress.address.lastIndexOf('.') + 1), + } else { + deviceInTheNetworkList[index] = DeviceInTheNetwork.createFromActiveHost( + activeHost: activeHost, + currentDeviceIp: ip!, + gatewayIp: gatewayIp!, + mdns: deviceInTheNetworkList[index].mdns, + mac: (await activeHost.arpData)?.macAddress, ); - return aIp.compareTo(bIp); - }); + } + + deviceInTheNetworkList.sort(sort); + emit(const HostScanState.loadInProgress()); - emit(HostScanState.foundNewDevice(activeHostList)); + emit(HostScanState.foundNewDevice(deviceInTheNetworkList)); } } - @Deprecated("Now network_tools support running scan inside isolate") + /// Getting active host IP and finds it's index inside of activeHostList + /// Returns -1 if didn't find + int indexOfActiveHost(String ip) { + return deviceInTheNetworkList + .indexWhere((element) => element.internetAddress.address == ip); + } - /// Will search devices in the network inside new isolate - static Future startSearchingDevices(dynamic params) async { - final channel = IsolateContactorController(params); - channel.onIsolateMessage.listen((message) async { - List paramsListString = []; - if (message is List) { - paramsListString = message; - } else { - return; - } + int sort(DeviceInTheNetwork a, DeviceInTheNetwork b) { + final regexA = a.internetAddress.address.contains('.') ? '.' : '::'; + final regexB = b.internetAddress.address.contains('.') ? '.' : '::'; + if (regexA.length == 2 || regexB.length == 2) { + return regexA.length.compareTo(regexB.length); + } + final int aIp = int.parse( + a.internetAddress.address.substring( + a.internetAddress.address.lastIndexOf(regexA) + regexA.length, + ), + ); + final int bIp = int.parse( + b.internetAddress.address.substring( + b.internetAddress.address.lastIndexOf(regexB) + regexB.length, + ), + ); - final String subnetIsolate = paramsListString[0]; - final int firstSubnetIsolate = int.parse(paramsListString[1]); - final int lastSubnetIsolate = int.parse(paramsListString[2]); - debugPrint('Scanning from $firstSubnetIsolate to $lastSubnetIsolate'); - - /// Will contain all the hosts that got discovered in the network, will - /// be use inorder to cancel on dispose of the page. - final Stream hostsDiscoveredInNetwork = - HostScanner.getAllPingableDevices( - subnetIsolate, - firstHostId: firstSubnetIsolate, - lastHostId: lastSubnetIsolate, - ); - - await for (final ActiveHost activeHostFound in hostsDiscoveredInNetwork) { - activeHostFound.deviceName.then((value) { - activeHostFound.mdnsInfo.then((value) { - activeHostFound.hostName.then((value) { - channel.sendResult(activeHostFound); - }); - }); - }); - } - channel.sendResult('Done'); - }); + return aIp.compareTo(bIp); } } diff --git a/lib/pages/host_scan_page/widgets/host_scan_widget.dart b/lib/pages/host_scan_page/widgets/host_scan_widget.dart index 2a1e494f..08a38b0a 100644 --- a/lib/pages/host_scan_page/widgets/host_scan_widget.dart +++ b/lib/pages/host_scan_page/widgets/host_scan_widget.dart @@ -19,9 +19,9 @@ class HostScanWidget extends StatelessWidget { return Expanded( child: Container( margin: const EdgeInsets.all(30), - child: Column( + child: const Column( mainAxisAlignment: MainAxisAlignment.center, - children: const [ + children: [ CircularProgressIndicator(), SizedBox( height: 30, @@ -56,7 +56,9 @@ class HostScanWidget extends StatelessWidget { }, initialData: 'Generic Device', ), - subtitle: Text(host.internetAddress.address), + subtitle: Text( + '${host.internetAddress.address} ${host.mac}', + ), trailing: IconButton( tooltip: 'Scan open ports for this target', icon: const Icon(Icons.radar), diff --git a/lib/pages/network_troubleshoot/port_scan_page.dart b/lib/pages/network_troubleshoot/port_scan_page.dart index 910fae0e..c0a7ef2e 100644 --- a/lib/pages/network_troubleshoot/port_scan_page.dart +++ b/lib/pages/network_troubleshoot/port_scan_page.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:network_tools/network_tools.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'; @@ -38,7 +38,7 @@ class _PortScanPageState extends State final List _tabs = [ const Tab(text: 'Popular Targets'), const Tab(text: 'Custom Ranges'), - const Tab(text: 'Popular Ports') + const Tab(text: 'Popular Ports'), ]; final _formKey = GlobalKey(); @@ -77,7 +77,7 @@ class _PortScanPageState extends State _openPorts.clear(); }); if (_type == ScanType.single) { - PortScanner.isOpen( + PortScannerFlutter.isOpen( _targetIPEditingController.text, int.parse(_singlePortEditingController.text), ).then((value) { @@ -85,14 +85,14 @@ class _PortScanPageState extends State _handleOnDone(); }); } else if (_type == ScanType.top) { - _streamSubscription = PortScanner.customDiscover( + _streamSubscription = PortScannerFlutter.customDiscover( _targetIPEditingController.text, timeout: Duration(milliseconds: appSettings.socketTimeout), progressCallback: _handleProgress, ).listen(_handleEvent, onDone: _handleOnDone); } else { //TODO: uncomment - _streamSubscription = PortScanner.scanPortsForSingleDevice( + _streamSubscription = PortScannerFlutter.scanPortsForSingleDevice( _targetIPEditingController.text, startPort: int.parse(_startPortEditingController.text), endPort: int.parse(_endPortEditingController.text), @@ -187,7 +187,7 @@ class _PortScanPageState extends State decoration: const InputDecoration(filled: true, hintText: 'End Port'), ), - ) + ), ], ); } @@ -360,7 +360,7 @@ class _PortScanPageState extends State _getDomainChip('youtube.com'), _getDomainChip('apple.com'), _getDomainChip('amazon.com'), - _getDomainChip('cloudflare.com') + _getDomainChip('cloudflare.com'), ], ), Wrap( diff --git a/lib/pages/ping_page/ping_page.dart b/lib/pages/ping_page/ping_page.dart index 06f1ec6f..0dac7762 100644 --- a/lib/pages/ping_page/ping_page.dart +++ b/lib/pages/ping_page/ping_page.dart @@ -122,7 +122,7 @@ class _PingPageState extends BasePage { children: [ Text('Sent: ${_pingSummary?.transmitted ?? '--'}'), Text('Received : ${_pingSummary?.transmitted ?? '--'}'), - Text('Total time: ${_getTime(_pingSummary?.time)}') + Text('Total time: ${_getTime(_pingSummary?.time)}'), ], ); } diff --git a/lib/pages/port_scan_page/port_scan_bloc/port_scan_bloc.dart b/lib/pages/port_scan_page/port_scan_bloc/port_scan_bloc.dart index 051fc21c..ef58f809 100644 --- a/lib/pages/port_scan_page/port_scan_bloc/port_scan_bloc.dart +++ b/lib/pages/port_scan_page/port_scan_bloc/port_scan_bloc.dart @@ -1,7 +1,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:injectable/injectable.dart'; -import 'package:network_tools/network_tools.dart'; +import 'package:network_tools_flutter/network_tools_flutter.dart'; part 'port_scan_bloc.freezed.dart'; part 'port_scan_event.dart'; diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index cfe0b220..d7242208 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -190,7 +190,7 @@ class _SettingsPageState extends State { 'Made with ❤️ in India', textAlign: TextAlign.center, ), - ) + ), ], ); }, diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index fc531dc2..8d91c82a 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,12 +7,14 @@ import Foundation import network_info_plus import package_info_plus +import path_provider_foundation import shared_preferences_foundation import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { NetworkInfoPlusPlugin.register(with: registry.registrar(forPlugin: "NetworkInfoPlusPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/macos/Podfile.lock b/macos/Podfile.lock index b2e7e042..54066a3e 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -4,6 +4,9 @@ PODS: - FlutterMacOS - package_info_plus (0.0.1): - FlutterMacOS + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS @@ -14,7 +17,8 @@ DEPENDENCIES: - FlutterMacOS (from `Flutter/ephemeral`) - network_info_plus (from `Flutter/ephemeral/.symlinks/plugins/network_info_plus/macos`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`) + - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) + - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) EXTERNAL SOURCES: @@ -24,8 +28,10 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/network_info_plus/macos package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos + path_provider_foundation: + :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin shared_preferences_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos + :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin url_launcher_macos: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos @@ -33,9 +39,10 @@ SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 network_info_plus: f4fbc7877ab7b3294500d9441dfa53cd54972d05 package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce - shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 - url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451 + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 PODFILE CHECKSUM: 4d1ddd58dcd1dc92dd2b397bbacb622f345603ab -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index b7159b8f..36107ed8 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -203,7 +203,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 9a7c8f51..3bbcb37d 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =2.17.0 <3.0.0" @@ -16,7 +16,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.5 - dart_ping: ^8.0.1 + dart_ping: ^9.0.0 flutter: sdk: flutter # Bloc for state management, replace StatefulWidget @@ -26,23 +26,22 @@ dependencies: # Service locator get_it: ^7.2.0 # A composable, multi-platform, Future-based API for HTTP requests. - http: ^0.13.5 + http: ^1.1.0 # Convenient code generator for get_it injectable: ^2.1.0 # An easy way to create a new isolate, keep it running and communicate with it. isolate_contactor: ^2.0.0+1 # Discover network info and configure themselves accordingly - network_info_plus: ^3.0.1 + network_info_plus: ^4.0.2 # Helps you discover open ports, devices on subnet and more. - network_tools: ^3.2.1 - # network_tools: - # path: ../network_tools/network_tools + network_tools_flutter: ^1.0.4 # Querying information about the application package, such as CFBundleVersion - package_info_plus: ^3.0.1 + package_info_plus: ^4.1.0 + path_provider: ^2.1.1 # Allows you to display progress widgets based on percentage. percent_indicator: ^4.2.2 # Popup that ask for the requested permission - permission_handler: ^10.2.0 + permission_handler: ^11.0.0 # A wrapper around InheritedWidget to make them easier to use and more reusable. provider: ^6.0.4 # Reading and writing simple key-value pairs diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index f2a99ad7..a0d0bbeb 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,13 +6,10 @@ #include "generated_plugin_registrant.h" -#include #include #include void RegisterPlugins(flutter::PluginRegistry* registry) { - NetworkInfoPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("NetworkInfoPlusWindowsPlugin")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 13c3c0c9..c20a586d 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - network_info_plus permission_handler_windows url_launcher_windows )