diff --git a/.github/workflows/flutter_release.yml b/.github/workflows/flutter_release.yml index 8f516d96..5d2a98c0 100644 --- a/.github/workflows/flutter_release.yml +++ b/.github/workflows/flutter_release.yml @@ -40,9 +40,6 @@ jobs: - name: Download pub dependencies run: flutter pub get - - name: Upgrade pub dependencies - run: flutter pub upgrade - - name: Run build_runner run: dart run build_runner build --delete-conflicting-outputs @@ -150,9 +147,6 @@ jobs: - name: Download pub dependencies run: flutter pub get - - name: Upgrade pub dependencies - run: flutter pub upgrade - - name: Run build_runner run: dart run build_runner build --delete-conflicting-outputs @@ -204,9 +198,6 @@ jobs: - name: Download pub dependencies run: flutter pub get - - name: Upgrade pub dependencies - run: flutter pub upgrade - - name: Run build_runner run: dart run build_runner build --delete-conflicting-outputs diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index e5641f18..85a6d12a 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -7,7 +7,7 @@ on: workflow_call: concurrency: - group: ${{ github.head_ref }} + group: ${{ github.head_ref || github.run_id}} cancel-in-progress: true jobs: @@ -51,10 +51,14 @@ jobs: name: 'Flutter Analyze + Test' needs: changes if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.yaml == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' }} - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch - name: Setup Java JDK uses: actions/setup-java@v4.2.1 with: @@ -85,14 +89,23 @@ jobs: build-runner- - name: Download pub dependencies run: flutter pub get - - name: Upgrade pub dependencies - run: flutter pub upgrade - name: Run build_runner run: flutter pub run build_runner build - name: Run analyzer run: flutter analyze + - name: Install coverage tools + run: flutter pub global activate coverage - name: Run tests run: flutter test + - name: Run integration tests + if: ${{ steps.extract_branch.outputs.branch == 'dev' }} + run: flutter test integration_test --coverage -d macos + - name: Upload Coverage to CodeCov + if: ${{ steps.extract_branch.outputs.branch == 'dev' }} + uses: codecov/codecov-action@v3 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: coverage/lcov.info android-linux-build: name: 'Build Android + Linux' @@ -130,8 +143,6 @@ jobs: build-runner- - name: Download pub dependencies run: flutter pub get - - name: Upgrade pub dependencies - run: flutter pub upgrade - name: Run build_runner run: flutter pub run build_runner build - name: Build Android @@ -186,8 +197,6 @@ jobs: ${{ runner.os }}-pods- - name: Download pub dependencies run: flutter pub get - - name: Upgrade pub dependencies - run: flutter pub upgrade - name: Run build_runner run: flutter pub run build_runner build - name: Build macos @@ -224,8 +233,6 @@ jobs: build-runner- - name: Download pub dependencies run: flutter pub get - - name: Upgrade pub dependencies - run: flutter pub upgrade - name: Run build_runner run: flutter pub run build_runner build - name: Build windows diff --git a/README.md b/README.md index bbc0307c..047853c7 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Vernet - Network Analyzer and Monitoring Tool ![GitHub repo size](https://img.shields.io/github/repo-size/git-elliot/vernet) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/osociety/vernet/total) ![Liberapay receiving](https://img.shields.io/liberapay/receives/opensociety) +[![codecov](https://codecov.io/gh/osociety/vernet/graph/badge.svg?token=B25JBP4RCI)](https://codecov.io/gh/osociety/vernet) ## Features diff --git a/android/fastlane/metadata/android/en-US/changelogs/29.txt b/android/fastlane/metadata/android/en-US/changelogs/29.txt new file mode 100644 index 00000000..b515ef24 --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/29.txt @@ -0,0 +1 @@ +Fixed slowness of devices scan. \ No newline at end of file diff --git a/generate_coverage.sh b/generate_coverage.sh new file mode 100644 index 00000000..81709f10 --- /dev/null +++ b/generate_coverage.sh @@ -0,0 +1,2 @@ +genhtml coverage/lcov.info -o coverage/html +open coverage/html/index.html \ No newline at end of file diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart new file mode 100644 index 00000000..3054da6e --- /dev/null +++ b/integration_test/app_test.dart @@ -0,0 +1,88 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:network_tools_flutter/network_tools_flutter.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:vernet/injection.dart'; +import 'package:vernet/main.dart'; +import 'package:vernet/ui/adaptive/adaptive_list.dart'; +import 'package:vernet/values/keys.dart'; + +void main() { + late ServerSocket server; + int port = 0; + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + setUpAll(() async { + configureDependencies(Env.test); + final appDocDirectory = await getApplicationDocumentsDirectory(); + await configureNetworkToolsFlutter(appDocDirectory.path); + //open a port in shared way because of portscanner using same, + //if passed false then two hosts come up in search and breaks test. + server = + await ServerSocket.bind(InternetAddress.anyIPv4, port, shared: true); + port = server.port; + debugPrint("Opened port in this machine at $port"); + }); + + group('host scanner end-to-end test', () { + testWidgets('just test if app is able to launch and display homepage', + (tester) async { + // Load app widget. + await tester.pumpWidget(const MyApp(true)); + await tester.pumpAndSettle(); + + // Verify that there are 4 widgets at homepage + expect(find.bySubtype(), findsAtLeastNWidgets(4)); + }); + + testWidgets('tap on the scan for devices button, verify device found', + (tester) async { + // Load app widget. + await tester.pumpWidget(const MyApp(true)); + await tester.pumpAndSettle(); + + // Verify that there are 4 widgets at homepage + expect(find.bySubtype(), findsAtLeastNWidgets(4)); + + // Finds the scan for devices button to tap on. + final devicesButton = find.byKey(WidgetKey.scanForDevicesButton.key); + + // Emulate a tap on the button. + await tester.tap(devicesButton); + await tester.pump(); + expect(find.byType(AdaptiveListTile), findsAny); + await tester.pumpAndSettle(); + await tester.pump(); + expect(find.byType(AdaptiveListTile), findsAtLeast(2)); + + final routerIconButton = + find.byKey(WidgetKey.thisDeviceTileIconButton.key); + + await tester.tap(routerIconButton); + await tester.pumpAndSettle(); + expect(find.byType(AppBar), findsOne); + + final radioButton = find.byKey(WidgetKey.singlePortScanRadioButton.key); + await tester.tap(radioButton); + await tester.pumpAndSettle(); + + await tester.enterText( + find.byKey(WidgetKey.enterPortTextField.key), + port.toString(), + ); + await tester.pumpAndSettle(); + + final portScanButton = find.byKey(WidgetKey.portScanButton.key); + await tester.tap(portScanButton); + await tester.pumpAndSettle(); + await tester.pump(); + expect(find.byType(AdaptiveListTile), findsAny); + }); + }); + + tearDownAll(() { + server.close(); + }); +} diff --git a/lib/helper/app_settings.dart b/lib/helper/app_settings.dart index 49e31a07..9dc22c11 100644 --- a/lib/helper/app_settings.dart +++ b/lib/helper/app_settings.dart @@ -113,4 +113,8 @@ class AppSettings { _customSubnet; debugPrint("Custom Subnet : $_customSubnet"); } + + Future clearAll() async { + return (await SharedPreferences.getInstance()).clear(); + } } diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index f33b6db1..0efe4e9f 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -19,6 +19,7 @@ import 'package:vernet/repository/notification_service.dart'; import 'package:vernet/services/impls/device_scanner_service.dart'; import 'package:vernet/ui/adaptive/adaptive_list.dart'; import 'package:vernet/ui/custom_tile.dart'; +import 'package:vernet/values/keys.dart'; import 'package:vernet/values/strings.dart'; class HomePage extends StatefulWidget { @@ -168,6 +169,7 @@ class _WifiDetailState extends State { width: 4, ), ElevatedButton( + key: WidgetKey.scanForDevicesButton.key, onPressed: () { Navigator.push( context, @@ -192,7 +194,7 @@ class _WifiDetailState extends State { } else if (snapshot.hasError) { return const Text("Unable to fetch WiFi details"); } else { - return const CircularProgressIndicator.adaptive(); + return const Text('Loading...'); } }, ), @@ -221,6 +223,7 @@ class _WifiDetailState extends State { ), const SizedBox(width: 10), ElevatedButton.icon( + key: WidgetKey.scanForOpenPortsButton.key, onPressed: () { Navigator.push( context, diff --git a/lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart b/lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart index eb7e4d81..e28a589d 100644 --- a/lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart +++ b/lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart @@ -9,7 +9,6 @@ import 'package:network_tools_flutter/network_tools_flutter.dart'; import 'package:vernet/helper/utils_helper.dart'; import 'package:vernet/injection.dart'; import 'package:vernet/main.dart'; -import 'package:vernet/models/device_in_the_network.dart'; import 'package:vernet/models/isar/device.dart'; import 'package:vernet/models/isar/scan.dart'; import 'package:vernet/repository/notification_service.dart'; @@ -38,7 +37,7 @@ class HostScanBloc extends Bloc { String? subnet; /// List of all ActiveHost devices that got found in the current scan - final List deviceInTheNetworkList = []; + final Set devicesSet = {}; /// mDNS for each ip final Map mDnsDevices = {}; @@ -47,7 +46,7 @@ class HostScanBloc extends Bloc { Initialized event, Emitter emit, ) async { - deviceInTheNetworkList.clear(); + devicesSet.clear(); mDnsDevices.clear(); emit(const HostScanState.loadInProgress()); await initializeWifiParameters(emit); @@ -82,16 +81,16 @@ class HostScanBloc extends Bloc { ) async { emit(const HostScanState.loadInProgress()); - final Set devices = {}; final deviceStream = getIt().startNewScan(subnet!, ip!, gatewayIp!); await for (final Device device in deviceStream) { - devices.add(device); - emit(HostScanState.foundNewDevice(devices)); + devicesSet.add(device); + emit(const HostScanState.loadInProgress()); + emit(HostScanState.foundNewDevice(devicesSet)); } await NotificationService.showNotificationWithActions(); - emit(HostScanState.loadSuccess(devices)); + emit(HostScanState.loadSuccess(devicesSet)); } Future _loadScanAndShowResults( @@ -100,10 +99,10 @@ class HostScanBloc extends Bloc { ) async { emit(const HostScanState.loadInProgress()); - final Set devicesSet = {}; final deviceStream = await getIt().getOnGoingScan(); deviceStream.listen((devices) { devicesSet.addAll(devices); + emit(const HostScanState.loadInProgress()); emit(HostScanState.foundNewDevice(devicesSet)); }); 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 05d3ceef..1e000109 100644 --- a/lib/pages/host_scan_page/widgets/host_scan_widget.dart +++ b/lib/pages/host_scan_page/widgets/host_scan_widget.dart @@ -6,6 +6,9 @@ import 'package:vernet/models/isar/device.dart'; import 'package:vernet/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart'; import 'package:vernet/pages/network_troubleshoot/port_scan_page.dart'; import 'package:vernet/ui/adaptive/adaptive_list.dart'; +import 'package:vernet/values/keys.dart'; +import 'package:vernet/values/strings.dart'; +import 'package:vernet/values/tooltip_messages.dart'; //TODO: Device doesn't refresh when active scan going on class HostScanWidget extends StatelessWidget { @@ -29,7 +32,7 @@ class HostScanWidget extends StatelessWidget { Text( appSettings.gatewayIP.isNotEmpty ? 'Searching for devices in ${appSettings.gatewayIP} network' - : 'Searching for devices in your local network', + : StringValue.loadingDevicesMessage, textAlign: TextAlign.center, ), ], @@ -68,15 +71,9 @@ class HostScanWidget extends StatelessWidget { textAlign: TextAlign.center, ), trailing: loading - ? const Padding( - padding: EdgeInsets.all(8.0), - child: SizedBox( - height: 25.0, - width: 25.0, - child: Center(child: CircularProgressIndicator.adaptive()), - ), - ) + ? const SizedBox() : IconButton( + key: WidgetKey.rescanIconButton.key, onPressed: () { context .read() @@ -97,7 +94,10 @@ class HostScanWidget extends StatelessWidget { '${host.internetAddress}, ${host.macAddress ?? ''}', ), trailing: IconButton( - tooltip: 'Scan open ports for this target', + key: host.deviceMake == 'This device' + ? WidgetKey.thisDeviceTileIconButton.key + : null, + tooltip: TooltipMessages.currentDevicePortScan, icon: const Icon(Icons.radar), onPressed: () { Navigator.push( diff --git a/lib/pages/network_troubleshoot/port_scan_page.dart b/lib/pages/network_troubleshoot/port_scan_page.dart index 6143685c..cb82e550 100644 --- a/lib/pages/network_troubleshoot/port_scan_page.dart +++ b/lib/pages/network_troubleshoot/port_scan_page.dart @@ -2,13 +2,13 @@ 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'; import 'package:vernet/ui/adaptive/adaptive_list.dart'; import 'package:vernet/ui/custom_tile.dart'; import 'package:vernet/ui/popular_chip.dart'; +import 'package:vernet/values/keys.dart'; class PortScanPage extends StatefulWidget { const PortScanPage({this.target = '', this.runDefaultScan = false}); @@ -26,8 +26,6 @@ class _PortScanPageState extends State with SingleTickerProviderStateMixin { final Set _openPorts = {}; - double _progress = 0; - final TextEditingController _targetIPEditingController = TextEditingController(); final TextEditingController _singlePortEditingController = @@ -50,17 +48,10 @@ class _PortScanPageState extends State .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(() { - _openPorts.addAll(host!.openPorts); + _openPorts.addAll(host.openPorts); }); } @@ -69,6 +60,11 @@ class _PortScanPageState extends State _completed = true; }); if (_completed && _openPorts.isEmpty) _showSnackBar('No open ports found'); + debugPrint( + _completed && _openPorts.isEmpty + ? 'No open ports found' + : 'Port Scan ended', + ); } StreamSubscription? _streamSubscription; @@ -93,7 +89,6 @@ class _PortScanPageState extends State .customDiscover( _targetIPEditingController.text, timeout: Duration(milliseconds: appSettings.socketTimeout), - progressCallback: _handleProgress, async: true, ) .listen(_handleEvent, onDone: _handleOnDone); @@ -104,7 +99,6 @@ class _PortScanPageState extends State startPort: int.parse(_startPortEditingController.text), endPort: int.parse(_endPortEditingController.text), timeout: Duration(milliseconds: appSettings.socketTimeout), - progressCallback: _handleProgress, async: true, ) .listen(_handleEvent, onDone: _handleOnDone); @@ -134,8 +128,9 @@ class _PortScanPageState extends State _streamSubscription?.cancel(); } - Widget _getCustomRangeChip(String label, String start, String end) { + Widget _getCustomRangeChip(Key key, String label, String start, String end) { return PopularChip( + key: key, label: label, onPressed: () { _startPortEditingController.text = start; @@ -153,8 +148,9 @@ class _PortScanPageState extends State ); } - Widget _getDomainChip(String label) { + Widget _getDomainChip(Key key, String label) { return PopularChip( + key: key, label: label, onPressed: () { _targetIPEditingController.text = label; @@ -165,6 +161,7 @@ class _PortScanPageState extends State Widget _getFields() { if (_type == ScanType.single) { return TextFormField( + key: WidgetKey.enterPortTextField.key, keyboardType: TextInputType.number, validator: validatePorts, autovalidateMode: AutovalidateMode.onUserInteraction, @@ -226,21 +223,6 @@ class _PortScanPageState extends State return Scaffold( appBar: AppBar( title: const Text('Open Ports Scanner'), - actions: [ - if (_completed) - const SizedBox() - else - Container( - margin: const EdgeInsets.only(right: 20.0), - child: CircularPercentIndicator( - radius: 10.0, - lineWidth: 2.5, - percent: _progress / 100, - backgroundColor: Colors.grey, - progressColor: Colors.white, - ), - ), - ], ), body: FutureBuilder>( future: PortDescLoader('assets/ports_lists.json').load(), @@ -302,6 +284,7 @@ class _PortScanPageState extends State Expanded( child: CustomTile( leading: Radio( + key: WidgetKey.rangePortScanRadioButton.key, value: ScanType.range, groupValue: _type, onChanged: (ScanType? value) { @@ -320,6 +303,7 @@ class _PortScanPageState extends State Expanded( child: CustomTile( leading: Radio( + key: WidgetKey.singlePortScanRadioButton.key, value: ScanType.single, groupValue: _type, onChanged: (ScanType? value) { @@ -335,6 +319,7 @@ class _PortScanPageState extends State Padding( padding: const EdgeInsets.all(3.0), child: ElevatedButton( + key: WidgetKey.portScanButton.key, onPressed: _completed ? () { if (_formKey.currentState!.validate()) { @@ -372,32 +357,54 @@ class _PortScanPageState extends State children: [ Wrap( children: [ - _getDomainChip('192.168.1.1'), - _getDomainChip('google.com'), - _getDomainChip('youtube.com'), - _getDomainChip('apple.com'), - _getDomainChip('amazon.com'), - _getDomainChip('cloudflare.com'), + _getDomainChip( + WidgetKey.localIpChip.key, + '192.168.1.1', + ), + _getDomainChip( + WidgetKey.googleChip.key, + 'google.com', + ), + _getDomainChip( + WidgetKey.youtubeChip.key, + 'youtube.com', + ), + _getDomainChip( + WidgetKey.appleChip.key, + 'apple.com', + ), + _getDomainChip( + WidgetKey.amazonChip.key, + 'amazon.com', + ), + _getDomainChip( + WidgetKey.cloudflareChip.key, + 'cloudflare.com', + ), ], ), Wrap( children: [ _getCustomRangeChip( + WidgetKey.knownPortChip.key, '0-1024 (known)', '0', '1024', ), _getCustomRangeChip( + WidgetKey.shortPortChip.key, '0-100 (short)', '0', '100', ), _getCustomRangeChip( + WidgetKey.veryShortPortChip.key, '0-10 (very short)', '0', '10', ), _getCustomRangeChip( + WidgetKey.fullPortChip.key, '0-65535 (Full)', '0', '65535', @@ -505,7 +512,7 @@ class _PortScanPageState extends State ); } else { return const Center( - child: CircularProgressIndicator(), + child: Text('Loading...'), ); } }, diff --git a/lib/values/keys.dart b/lib/values/keys.dart new file mode 100644 index 00000000..22c6cb36 --- /dev/null +++ b/lib/values/keys.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +enum WidgetKey implements Comparable { + thisDeviceTileIconButton('thisDeviceTileIconButton'), + rangePortScanRadioButton('rangePortScanRadioButton'), + singlePortScanRadioButton('singlePortScanRadioButton'), + scanForOpenPortsButton('scanForOpenPortsButton'), + scanForDevicesButton('scanForDevicesButton'), + enterPortTextField('enterPortTextField'), + veryShortPortChip('veryShortPortChip'), + rescanIconButton('rescanIconButton'), + portScanButton('portScanButton'), + cloudflareChip('cloudflareChip'), + knownPortChip('knownPortChip'), + shortPortChip('shortPortChip'), + fullPortChip('fullPortChip'), + youtubeChip('youtubeChip'), + localIpChip('localIpChip'), + googleChip('googleChip'), + amazonChip('amazonChip'), + appleChip('appleChip'); + + const WidgetKey(this.value); + final String value; + ValueKey get key => ValueKey(value); + + @override + int compareTo(WidgetKey other) => value.compareTo(other.value); +} diff --git a/lib/values/strings.dart b/lib/values/strings.dart index 9066a843..d1328ede 100644 --- a/lib/values/strings.dart +++ b/lib/values/strings.dart @@ -20,4 +20,6 @@ class StringValue { 'Scan a custom subnet instead of local one.'; static const String customSubnetHint = 'e.g., 10.102.200.1'; static const String hostScanPageTitle = 'Scan for devices'; + static const String loadingDevicesMessage = + 'Searching for devices in your local network'; } diff --git a/lib/values/tooltip_messages.dart b/lib/values/tooltip_messages.dart new file mode 100644 index 00000000..9d7a356a --- /dev/null +++ b/lib/values/tooltip_messages.dart @@ -0,0 +1,3 @@ +class TooltipMessages { + static const currentDevicePortScan = 'Scan open ports for this target'; +} diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 8ba80377..40a24a62 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -61,7 +61,7 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos SPEC CHECKSUMS: - flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4 + flutter_local_notifications: 4b427ffabf278fc6ea9484c97505e231166927a5 flutter_timezone: 6b906d1740654acb16e50b639835628fea851037 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 @@ -71,7 +71,7 @@ SPEC CHECKSUMS: package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 + url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 PODFILE CHECKSUM: 4d1ddd58dcd1dc92dd2b397bbacb622f345603ab diff --git a/pubspec.lock b/pubspec.lock index 56636202..fc4a12ec 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: dd09dd4e2b078992f42aac7f1a622f01882a8492fef08486b27ddde929c19f04 + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" url: "https://pub.dev" source: hosted - version: "2.4.12" + version: "2.4.13" build_runner_core: dependency: transitive description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" url: "https://pub.dev" source: hosted - version: "4.10.0" + version: "4.10.1" collection: dependency: transitive description: @@ -181,26 +181,26 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" crypto: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" csslib: dependency: transitive description: name: csslib - sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.2" csv: dependency: transitive description: @@ -301,10 +301,10 @@ packages: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -318,6 +318,11 @@ packages: url: "https://pub.dev" source: hosted version: "8.1.6" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_icmp_ping: dependency: transitive description: @@ -330,18 +335,18 @@ packages: dependency: transitive description: name: flutter_isolate - sha256: "994ddec596da4ca12ca52154fd59404077584643eb7e3f1008a55fda9fe0b76b" + sha256: "36a84e1a22371d8092ea2121145b330c24fb272acb951fb30c60ba44926b8fb3" url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.1.0" flutter_local_notifications: dependency: "direct main" description: name: flutter_local_notifications - sha256: c500d5d9e7e553f06b61877ca6b9c8b92c570a4c8db371038702e8ce57f8a50f + sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35" url: "https://pub.dev" source: hosted - version: "17.2.2" + version: "17.2.4" flutter_local_notifications_linux: dependency: transitive description: @@ -362,10 +367,10 @@ packages: dependency: "direct main" description: name: flutter_native_splash - sha256: aa06fec78de2190f3db4319dd60fdc8d12b2626e93ef9828633928c2dcaea840 + sha256: ee5c9bd2b74ea8676442fd4ab876b5d41681df49276488854d6c81a5377c0ef1 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" flutter_test: dependency: "direct dev" description: flutter @@ -408,6 +413,11 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" get_it: dependency: "direct main" description: @@ -436,10 +446,10 @@ packages: dependency: transitive description: name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" url: "https://pub.dev" source: hosted - version: "0.15.4" + version: "0.15.5" http: dependency: "direct main" description: @@ -468,10 +478,10 @@ packages: dependency: transitive description: name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.3.0" in_app_review: dependency: "direct main" description: @@ -492,10 +502,10 @@ packages: dependency: "direct main" description: name: injectable - sha256: "69874ba3ec10e3a0de3f519a184442878291d928f3299d718813f24642585198" + sha256: "5e1556ea1d374fe44cbe846414d9bab346285d3d8a1da5877c01ad0774006068" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.5.0" injectable_generator: dependency: "direct dev" description: @@ -504,6 +514,11 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.2" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" intl: dependency: transitive description: @@ -612,10 +627,10 @@ packages: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" matcher: dependency: transitive description: @@ -644,10 +659,10 @@ packages: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "2.0.0" multicast_dns: dependency: transitive description: @@ -691,11 +706,10 @@ packages: network_tools_flutter: dependency: "direct main" description: - path: "." - ref: dev - resolved-ref: ca55c2955eb9b4ca47757b5f95e2d7237daa4cab - url: "https://github.com/osociety/network_tools_flutter.git" - source: git + name: network_tools_flutter + sha256: "4c30dc1a472b29356d4103320b68a43ec968e541a119efcc89ea8dd9aa18740f" + url: "https://pub.dev" + source: hosted version: "2.0.2" nm: dependency: transitive @@ -789,18 +803,18 @@ packages: dependency: "direct main" description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.12" path_provider_foundation: dependency: transitive description: @@ -853,10 +867,10 @@ packages: dependency: transitive description: name: permission_handler_android - sha256: "76e4ab092c1b240d31177bb64d2b0bea43f43d0e23541ec866151b9f7b2490fa" + sha256: "71bbecfee799e65aff7c744761a57e817e73b738fedf62ab7afd5593da21f9f1" url: "https://pub.dev" source: hosted - version: "12.0.12" + version: "12.0.13" permission_handler_apple: dependency: transitive description: @@ -877,10 +891,10 @@ packages: dependency: transitive description: name: permission_handler_platform_interface - sha256: fe0ffe274d665be8e34f9c59705441a7d248edebbe5d9e3ec2665f88b79358ea + sha256: e9c8eadee926c4532d0305dff94b85bf961f16759c3af791486613152af4b4f9 url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.2.3" permission_handler_windows: dependency: transitive description: @@ -921,6 +935,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" process_run: dependency: transitive description: @@ -965,34 +987,34 @@ packages: dependency: transitive description: name: sembast - sha256: "481e0a4199015e0050ee4b42d59d51731b1fb324a1eea5c24557fa72335790b0" + sha256: "61f893e50fe2fa7d14529d275d45ac31871d7ad2ae3a745f9aa3afc0b447d75b" url: "https://pub.dev" source: hosted - version: "3.7.3+2" + version: "3.7.5+2" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" + sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.3" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: a7e8467e9181cef109f601e3f65765685786c1a738a83d7fbbde377589c0d974 + sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.3" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f + sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" url: "https://pub.dev" source: hosted - version: "2.5.2" + version: "2.5.3" shared_preferences_linux: dependency: transitive description: @@ -1102,14 +1124,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" synchronized: dependency: transitive description: name: synchronized - sha256: a824e842b8a054f91a728b783c177c1e4731f6b124f9192468457a8913371255 + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.3.0+3" term_glyph: dependency: transitive description: @@ -1154,10 +1184,10 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" universal_io: dependency: transitive description: @@ -1170,18 +1200,18 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" url: "https://pub.dev" source: hosted - version: "6.3.10" + version: "6.3.14" url_launcher_ios: dependency: transitive description: @@ -1194,18 +1224,18 @@ packages: dependency: transitive description: name: url_launcher_linux - sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.1" url_launcher_platform_interface: dependency: transitive description: @@ -1226,10 +1256,10 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" uuid: dependency: transitive description: @@ -1266,10 +1296,10 @@ packages: dependency: transitive description: name: web - sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" web_socket: dependency: transitive description: @@ -1286,22 +1316,30 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + url: "https://pub.dev" + source: hosted + version: "3.0.3" win32: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.8.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: @@ -1314,10 +1352,10 @@ packages: dependency: transitive description: name: xxh3 - sha256: a92b30944a9aeb4e3d4f3c3d4ddb3c7816ca73475cd603682c4f8149690f56d7 + sha256: cbeb0e1d10f4c6bf67b650f395eac0cc689425b5efc2ba0cc3d3e069a0beaeec url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" yaml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2043df16..091f4a5d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,13 +3,11 @@ description: A Network Analyzer publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.0.9+28 +version: 1.1.0+29 environment: sdk: ">=2.17.0 <3.0.0" -isar_version: &isar_version 3.1.0+1 - dependencies: # Automatically resizes text to fit perfectly within its bounds. auto_size_text: ^3.0.0 @@ -41,20 +39,16 @@ dependencies: # Convenient code generator for get_it injectable: ^2.1.0 # database for flutter - isar: *isar_version + isar: ^3.1.0+1 # contains Isar Core - isar_flutter_libs: *isar_version + isar_flutter_libs: ^3.1.0+1 # 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 json_annotation: ^4.8.1 network_info_plus: ^4.0.2 # Helps you discover open ports, devices on subnet and more. - # network_tools_flutter: ^2.0.0 - network_tools_flutter: - git: - url: https://github.com/osociety/network_tools_flutter.git - ref: dev # branch name + network_tools_flutter: ^2.0.2 # Querying information about the application package, such as CFBundleVersion package_info_plus: ^4.1.0 path_provider: ^2.1.1 @@ -81,7 +75,9 @@ dev_dependencies: freezed: ^2.5.0 # Convenient code generator for get_it. injectable_generator: ^2.1.4 - isar_generator: *isar_version + integration_test: + sdk: flutter + isar_generator: ^3.1.0+1 # Collection of lint rules for Dart and Flutter projects. json_serializable: ^6.7.1 lint: ^2.0.1 diff --git a/test/widget_test.dart b/test/widget_test.dart index 0a38b084..a23e4547 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -1,16 +1,11 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - import 'package:flutter_test/flutter_test.dart'; import 'package:vernet/main.dart'; -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp(false)); +Future main() async { + group('Widget test', () { + testWidgets('My first widget test', (tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp(false)); + }); }); }