From 75f4b28401f716148f5c0812cccfd997bd644dae Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 19:25:45 +0530 Subject: [PATCH 01/26] Archive full windows Release folder --- .github/workflows/flutter_release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/flutter_release.yml b/.github/workflows/flutter_release.yml index 5d2a98c..0ed1132 100644 --- a/.github/workflows/flutter_release.yml +++ b/.github/workflows/flutter_release.yml @@ -210,7 +210,6 @@ jobs: type: 'zip' filename: ${{ env.WINDOWS_ZIP }} directory: ${{ env.WINDOWS_BUILD_PATH }} - path: vernet.exe - name: Publish Windows Release uses: softprops/action-gh-release@v1 From 98790a9b2f47f1a10da295c61aee635e949c0dac Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 19:31:35 +0530 Subject: [PATCH 02/26] archive full macos --- .github/workflows/flutter_release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/flutter_release.yml b/.github/workflows/flutter_release.yml index 0ed1132..ff7a09a 100644 --- a/.github/workflows/flutter_release.yml +++ b/.github/workflows/flutter_release.yml @@ -159,7 +159,6 @@ jobs: type: 'zip' filename: ${{ env.MACOS_ZIP }} directory: ${{ env.MACOS_BUILD_PATH }} - path: vernet.app - name: Install Node 18 uses: actions/setup-node@v4 From 8aa972dd2ecfcec500bba5345e3756013eaf2506 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 19:33:14 +0530 Subject: [PATCH 03/26] Pre-release 1.1.0+30 --- android/fastlane/metadata/android/en-US/changelogs/30.txt | 1 + pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 android/fastlane/metadata/android/en-US/changelogs/30.txt diff --git a/android/fastlane/metadata/android/en-US/changelogs/30.txt b/android/fastlane/metadata/android/en-US/changelogs/30.txt new file mode 100644 index 0000000..8205805 --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/30.txt @@ -0,0 +1 @@ +Fixed dll files missing when running app on Windows \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 091f4a5..b2dcead 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A Network Analyzer publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.1.0+29 +version: 1.1.0+30 environment: sdk: ">=2.17.0 <3.0.0" From f4d0cac08172fb410170b72f22510cdcc0fa98de Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 21:57:14 +0530 Subject: [PATCH 04/26] Fix for windows and beta lane --- android/fastlane/Fastfile | 12 ++++++++++++ lib/pages/home_page.dart | 8 +++++++- .../host_scan_bloc/host_scan_bloc.dart | 7 ++++++- lib/repository/notification_service.dart | 3 +++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 396ffc8..6eba091 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -23,6 +23,18 @@ platform :android do desc "Submit a new Beta Build to Crashlytics Beta" lane :beta do + upload_to_play_store(skip_upload_metadata: true, + skip_upload_changelogs: true, + skip_upload_images: true, + skip_upload_screenshots: true, + track: 'beta', aab: '../build/app/outputs/bundle/storeRelease/app-store-release.aab') + + # sh "your_script.sh" + # You can also use other beta testing services here + end + + desc "Submit a new Beta Build to Crashlytics Beta" + lane :beta_full do upload_to_play_store(track: 'beta', aab: '../build/app/outputs/bundle/storeRelease/app-store-release.aab') # sh "your_script.sh" diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 0efe4e9..107188b 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -45,9 +45,15 @@ class _WifiDetailState extends State { final wifiIP = await NetworkInfo().getWifiIP(); final wifiBSSID = await NetworkInfo().getWifiBSSID(); final wifiName = await NetworkInfo().getWifiName(); + String? wifiGatewayIP; + try { + wifiGatewayIP = await NetworkInfo().getWifiGatewayIP(); + } on Exception catch (e) { + debugPrint('Unimplemented error $e'); + } final gatewayIp = appSettings.customSubnet.isNotEmpty ? appSettings.customSubnet - : await NetworkInfo().getWifiGatewayIP() ?? ''; + : (wifiGatewayIP ?? wifiIP) ?? ''; final bool isLocationOn = (Platform.isAndroid || Platform.isIOS) && await Permission.location.serviceStatus.isEnabled; _wifiInfo = WifiInfo( 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 e28a589..222b270 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 @@ -58,7 +58,12 @@ class HostScanBloc extends Bloc { } Future initializeWifiParameters(Emitter emit) async { - final wifiGatewayIP = await NetworkInfo().getWifiGatewayIP(); + String? wifiGatewayIP; + try { + wifiGatewayIP = await NetworkInfo().getWifiGatewayIP(); + } on Exception catch (e) { + debugPrint("Not implemented $e"); + } ip = await NetworkInfo().getWifiIP(); if (appSettings.customSubnet.isNotEmpty) { gatewayIp = appSettings.customSubnet; diff --git a/lib/repository/notification_service.dart b/lib/repository/notification_service.dart index 48abb00..53d5941 100644 --- a/lib/repository/notification_service.dart +++ b/lib/repository/notification_service.dart @@ -50,6 +50,7 @@ class NotificationService { StreamController.broadcast(); static Future initNotification() async { + if (Platform.isWindows) return Future.value(); await _configureLocalTimeZone(); final NotificationAppLaunchDetails? notificationAppLaunchDetails = !kIsWeb && Platform.isLinux @@ -141,6 +142,7 @@ class NotificationService { } static Future showNotificationWithActions() async { + if (Platform.isWindows) return Future.value(); const AndroidNotificationDetails androidNotificationDetails = AndroidNotificationDetails( 'your channel id', @@ -193,6 +195,7 @@ class NotificationService { } static Future grantPermissions() async { + if (Platform.isWindows) return Future.value(); await _isAndroidPermissionGranted(); await _requestPermissions(); } From f306cf3d317c7c4f6153003829045e9e5f5323bd Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 22:03:26 +0530 Subject: [PATCH 05/26] Prepare v1.1.0+31 --- android/fastlane/metadata/android/en-US/changelogs/31.txt | 2 ++ pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 android/fastlane/metadata/android/en-US/changelogs/31.txt diff --git a/android/fastlane/metadata/android/en-US/changelogs/31.txt b/android/fastlane/metadata/android/en-US/changelogs/31.txt new file mode 100644 index 0000000..0b31331 --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/31.txt @@ -0,0 +1,2 @@ +Compatibility issues fixed for windows +Scan slowness improved \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index b2dcead..5bdf227 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A Network Analyzer publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.1.0+30 +version: 1.1.0+31 environment: sdk: ">=2.17.0 <3.0.0" From bda3e83a0fcb73e132385ed2df7edf805072cd81 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 22:15:21 +0530 Subject: [PATCH 06/26] updated readme --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 047853c..94515a3 100644 --- a/README.md +++ b/README.md @@ -52,12 +52,19 @@ Note: macOS build hasn't been notarized yet. 4. Extract downloaded zip file. 5. Go to bundle folder and double click vernet file. +### Instruction for Windows +1. Star this repository. +2. Download vernet-windows.zip from [releases](https://github.com/git-elliot/vernet/releases/latest) +3. Extract downloaded zip file. +4. Run vernet.exe +5. Click on more info, tap on 'Run anyway'. +5. Give permission if asked. + ## Contributors Required -1. Linux/Windows Tester -2. Documenter +1. Technical writer -Drop mail at fs0c19ty@protonmail.com +Write us at fs0c19ty@protonmail.com ## Publishing to F-droid You can follow this guide to publish your app to f-droid - https://op3nsoc13ty.blogspot.com/2021/06/publish-your-first-flutter-app-to-fdroid.html From 8db98e8ae84876df824a1353881f8ff0248f427c Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 22:35:49 +0530 Subject: [PATCH 07/26] bug fix for windows --- android/fastlane/metadata/android/en-US/changelogs/32.txt | 2 ++ lib/pages/home_page.dart | 2 +- lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 android/fastlane/metadata/android/en-US/changelogs/32.txt diff --git a/android/fastlane/metadata/android/en-US/changelogs/32.txt b/android/fastlane/metadata/android/en-US/changelogs/32.txt new file mode 100644 index 0000000..0b31331 --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/32.txt @@ -0,0 +1,2 @@ +Compatibility issues fixed for windows +Scan slowness improved \ No newline at end of file diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 107188b..284376f 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -48,7 +48,7 @@ class _WifiDetailState extends State { String? wifiGatewayIP; try { wifiGatewayIP = await NetworkInfo().getWifiGatewayIP(); - } on Exception catch (e) { + } catch (e) { debugPrint('Unimplemented error $e'); } final gatewayIp = appSettings.customSubnet.isNotEmpty 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 222b270..d829711 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 @@ -61,8 +61,8 @@ class HostScanBloc extends Bloc { String? wifiGatewayIP; try { wifiGatewayIP = await NetworkInfo().getWifiGatewayIP(); - } on Exception catch (e) { - debugPrint("Not implemented $e"); + } catch (e) { + debugPrint('Unimplemented error $e'); } ip = await NetworkInfo().getWifiIP(); if (appSettings.customSubnet.isNotEmpty) { diff --git a/pubspec.yaml b/pubspec.yaml index 5bdf227..62f9cd9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A Network Analyzer publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.1.0+31 +version: 1.1.0+32 environment: sdk: ">=2.17.0 <3.0.0" From a09f752f9bc3ed6788be393dcd5f29e314de2d8a Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sun, 17 Nov 2024 22:31:40 +0530 Subject: [PATCH 08/26] Upgrade dependencies --- lib/repository/notification_service.dart | 2 - pubspec.lock | 131 +++++++++++++---------- pubspec.yaml | 57 +++++----- 3 files changed, 102 insertions(+), 88 deletions(-) diff --git a/lib/repository/notification_service.dart b/lib/repository/notification_service.dart index 53d5941..112de85 100644 --- a/lib/repository/notification_service.dart +++ b/lib/repository/notification_service.dart @@ -121,12 +121,10 @@ class NotificationService { switch (notificationResponse.notificationResponseType) { case NotificationResponseType.selectedNotification: selectNotificationStream.add(notificationResponse.payload); - break; case NotificationResponseType.selectedNotificationAction: if (notificationResponse.actionId == navigationActionId) { selectNotificationStream.add(notificationResponse.payload); } - break; } }, ); diff --git a/pubspec.lock b/pubspec.lock index fc4a12e..98afa81 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "61.0.0" - analyzer: + version: "72.0.0" + _macros: dependency: transitive + description: dart + source: sdk + version: "0.3.2" + analyzer: + dependency: "direct overridden" description: name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "5.13.0" + version: "6.7.0" ansicolor: dependency: transitive description: @@ -237,10 +242,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.7" dartx: dependency: transitive description: @@ -261,10 +266,10 @@ packages: dependency: "direct main" description: name: external_app_launcher - sha256: fb55cddd706c62ede11056750d5e018ef379820e09739e967873211dd537d833 + sha256: a80847a8e24cce37f1c953ec20a9600c3b12167e279b5868945e880cea717bf7 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.0" fake_async: dependency: transitive description: @@ -273,14 +278,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" - fake_http_client: - dependency: transitive - description: - name: fake_http_client - sha256: "4d9be8662a5424f04b95f616f5af9d8041744ad018e5c93f6583e6cf2d3f502d" - url: "https://pub.dev" - source: hosted - version: "1.0.0" ffi: dependency: transitive description: @@ -343,26 +340,26 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35" + sha256: ef41ae901e7529e52934feba19ed82827b11baa67336829564aeab3129460610 url: "https://pub.dev" source: hosted - version: "17.2.4" + version: "18.0.1" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af + sha256: "8f685642876742c941b29c32030f6f4f6dacd0e4eaecb3efbb187d6a3812ca01" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "5.0.0" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "85f8d07fe708c1bdcf45037f2c0109753b26ae077e9d9e899d55971711a4ea66" + sha256: "6c5b83c86bf819cdb177a9247a3722067dd8cc6313827ce7c77a4b238a26fd52" url: "https://pub.dev" source: hosted - version: "7.2.0" + version: "8.0.0" flutter_native_splash: dependency: "direct main" description: @@ -393,10 +390,10 @@ packages: dependency: "direct dev" description: name: freezed - sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 + sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e" url: "https://pub.dev" source: hosted - version: "2.5.2" + version: "2.5.7" freezed_annotation: dependency: "direct main" description: @@ -422,10 +419,10 @@ packages: dependency: "direct main" description: name: get_it - sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 + sha256: c49895c1ecb0ee2a0ec568d39de882e2c299ba26355aa6744ab1001f98cebd15 url: "https://pub.dev" source: hosted - version: "7.7.0" + version: "8.0.2" glob: dependency: transitive description: @@ -510,10 +507,10 @@ packages: dependency: "direct dev" description: name: injectable_generator - sha256: "7fb573114f8bbdd169f7ae9b0bcd13f464e8170454c27be816d5a1bb39ac8086" + sha256: af403d76c7b18b4217335e0075e950cd0579fd7f8d7bd47ee7c85ada31680ba1 url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.6.2" integration_test: dependency: "direct dev" description: flutter @@ -523,10 +520,10 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: "99f282cb0e02edcbbf8c6b3bbc7c90b65635156c412e58f3975a7e55284ce685" url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.20.0" io: dependency: transitive description: @@ -631,6 +628,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: @@ -683,18 +688,18 @@ packages: dependency: "direct main" description: name: network_info_plus - sha256: "4601b815b1c6a46d84839f65cd774a7d999738471d910fae00d813e9e98b04e1" + sha256: bf9e39e523e9951d741868dc33ac386b0bc24301e9b7c8a7d60dbc34879150a8 url: "https://pub.dev" source: hosted - version: "4.1.0+1" + version: "6.1.1" network_info_plus_platform_interface: dependency: transitive description: name: network_info_plus_platform_interface - sha256: "881f5029c5edaf19c616c201d3d8b366c5b1384afd5c1da5a49e4345de82fb8b" + sha256: b7f35f4a7baef511159e524499f3c15464a49faa5ec10e92ee0bce265e664906 url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "2.0.1" network_tools: dependency: transitive description: @@ -707,10 +712,10 @@ packages: dependency: "direct main" description: name: network_tools_flutter - sha256: "4c30dc1a472b29356d4103320b68a43ec968e541a119efcc89ea8dd9aa18740f" + sha256: "45eca9589c271258fb14fc5e5542d880039d822f882190a05fff8d9bbce2fb8f" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" nm: dependency: transitive description: @@ -723,50 +728,50 @@ packages: dependency: transitive description: name: nsd - sha256: "88a3ba4e6dc38363f1256b4b482abdeec396d99df31a064d545e559cb4cb6ba9" + sha256: b20c4e7b11b40085163c2736c27e3d450c3970512ddab7ea5f144586fb0105d3 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "3.0.0" nsd_android: dependency: transitive description: name: nsd_android - sha256: "7a38d0b2d21f1e578cd3020940b95b22d5260413dc0c8cf30a987a4e410b166d" + sha256: "9e2c1d31a36c9b7f5bad6329f3d9e07c7f09e7a7394aa2f54db701516ac149eb" url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "2.0.0" nsd_ios: dependency: transitive description: name: nsd_ios - sha256: "7034134dd89595362d5e464030081b0d542120a558ab7fe6227df44365df3e8a" + sha256: "43b53bdcf0cedf7c481125e6a7e4a88c745de2e48a205404be3b4e91d77798b5" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "2.0.0" nsd_macos: dependency: transitive description: name: nsd_macos - sha256: "2403b8d599f50fc9179db1420a0ffc25bfa8bbeb814aa31ca0a71f804fc938da" + sha256: db1a07f4baf358b9d72ff9eb308c83419c60a57ef8c6d1e0369075825b835b43 url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "2.0.0" nsd_platform_interface: dependency: transitive description: name: nsd_platform_interface - sha256: "2f4033fa13cc45375253bf348abdb9712004e656462205543ec9506b43c67bb2" + sha256: "726bba1b93e18a37252623fd6490bafe6f3d7c225bff50421b7eeb7c47704d4b" url: "https://pub.dev" source: hosted - version: "1.6.0" + version: "2.0.0" nsd_windows: dependency: transitive description: name: nsd_windows - sha256: "06601efdd3268cbce4b90f8e23ae1dab445c97c661fba417821ce118add722e7" + sha256: "78910ac981ae0ab975cf4c30895512576220aed3dd57c3378a05eebe8e13ff88" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.0" package_config: dependency: transitive description: @@ -779,18 +784,18 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "8.1.1" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: transitive description: @@ -1092,6 +1097,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -1168,10 +1181,10 @@ packages: dependency: "direct main" description: name: timezone - sha256: "2236ec079a174ce07434e89fcd3fcda430025eb7692244139a9cf54fdcf1fc7d" + sha256: ffc9d5f4d1193534ef051f9254063fa53d588609418c84299956c3db9383587d url: "https://pub.dev" source: hosted - version: "0.9.4" + version: "0.10.0" timing: dependency: transitive description: @@ -1264,10 +1277,10 @@ packages: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_math: dependency: transitive description: @@ -1296,10 +1309,10 @@ packages: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "0.5.1" web_socket: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 62f9cd9..abf8405 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,38 +6,38 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.1.0+32 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.2.0 <4.0.0" dependencies: # Automatically resizes text to fit perfectly within its bounds. auto_size_text: ^3.0.0 # Helps implement the BLoC pattern. - bloc: ^8.1.0 + bloc: ^8.1.4 # 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: ^9.0.0 - external_app_launcher: ^3.1.0 + cupertino_icons: ^1.0.8 + dart_ping: ^9.0.1 + external_app_launcher: ^4.0.0 flutter: sdk: flutter # Bloc for state management, replace StatefulWidget - flutter_bloc: ^8.1.1 + flutter_bloc: ^8.1.6 # A cross platform plugin for displaying local notifications. - flutter_local_notifications: ^17.2.2 + flutter_local_notifications: ^18.0.1 # Native splash screen plugin - flutter_native_splash: ^2.4.0 + flutter_native_splash: ^2.4.2 # A flutter plugin for getting the local timezone of the OS. - flutter_timezone: ^3.0.0 + flutter_timezone: ^3.0.1 # Annotations for freezed - freezed_annotation: ^2.4.1 + freezed_annotation: ^2.4.4 # Service locator - get_it: ^7.2.0 + get_it: ^8.0.2 # A composable, multi-platform, Future-based API for HTTP requests. - http: ^1.1.0 + http: ^1.2.2 # A Flutter plugin that lets you show a review pop up where users can leave a review in_app_review: ^2.0.9 # Convenient code generator for get_it - injectable: ^2.1.0 + injectable: ^2.5.0 # database for flutter isar: ^3.1.0+1 # contains Isar Core @@ -45,25 +45,25 @@ dependencies: # 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 + json_annotation: ^4.9.0 + network_info_plus: ^6.1.1 # Helps you discover open ports, devices on subnet and more. 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 + package_info_plus: ^8.1.1 + path_provider: ^2.1.5 # Allows you to display progress widgets based on percentage. - percent_indicator: ^4.2.2 + percent_indicator: ^4.2.3 # Popup that ask for the requested permission - permission_handler: ^11.0.0 + permission_handler: ^11.3.1 # A wrapper around InheritedWidget to make them easier to use and more reusable. - provider: ^6.0.4 + provider: ^6.1.2 # Reading and writing simple key-value pairs - shared_preferences: ^2.0.15 + shared_preferences: ^2.3.3 # Time zone database and time zone aware DateTime. - timezone: ^0.9.4 + timezone: ^0.10.0 # Plugin for launching a URL - url_launcher: ^6.1.6 + url_launcher: ^6.3.1 dev_dependencies: # A build system for Dart code generation and modular compilation. @@ -72,15 +72,18 @@ dev_dependencies: flutter_test: sdk: flutter # Code generator for unions/pattern-matching/copy. - freezed: ^2.5.0 + freezed: ^2.5.7 # Convenient code generator for get_it. - injectable_generator: ^2.1.4 + injectable_generator: ^2.6.2 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 + json_serializable: ^6.8.0 + lint: ^2.3.0 + +dependency_overrides: + analyzer: ^6.3.0 flutter: From c3d33f77efa1bee195444686bbf1ac1a03851c07 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sun, 17 Nov 2024 22:35:40 +0530 Subject: [PATCH 09/26] removed listener --- lib/models/wifi_info.dart | 8 ++++---- lib/repository/notification_service.dart | 11 ----------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/lib/models/wifi_info.dart b/lib/models/wifi_info.dart index ba0c583..85922b7 100644 --- a/lib/models/wifi_info.dart +++ b/lib/models/wifi_info.dart @@ -22,15 +22,15 @@ class WifiInfo { static const String noWifiName = 'Wi-Fi'; String get name { - if (_name == null || _name!.isEmpty) return noWifiName; - if (_name!.startsWith('"') && _name!.endsWith('"')) { - final array = _name!.split('"'); + if (_name == null || _name.isEmpty) return noWifiName; + if (_name.startsWith('"') && _name.endsWith('"')) { + final array = _name.split('"'); if (array.length > 1) { final wifiName = array[1]; return wifiName.isEmpty ? noWifiName : wifiName; } } - return _name!; + return _name; } String get bssid => _bssid ?? defaultBSSID.first; diff --git a/lib/repository/notification_service.dart b/lib/repository/notification_service.dart index 112de85..57725ae 100644 --- a/lib/repository/notification_service.dart +++ b/lib/repository/notification_service.dart @@ -89,17 +89,6 @@ class NotificationService { requestAlertPermission: false, requestBadgePermission: false, requestSoundPermission: false, - onDidReceiveLocalNotification: - (int id, String? title, String? body, String? payload) async { - didReceiveLocalNotificationStream.add( - ReceivedNotification( - id: id, - title: title, - body: body, - payload: payload, - ), - ); - }, notificationCategories: darwinNotificationCategories, ); final LinuxInitializationSettings initializationSettingsLinux = From 960c85571c040b617343a6cbe335f43a7a957bf0 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sun, 17 Nov 2024 23:09:19 +0530 Subject: [PATCH 10/26] Run tests on matrix --- .github/workflows/flutter_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index 85a6d12..e55b79c 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -49,9 +49,12 @@ jobs: flutter-test: name: 'Flutter Analyze + Test' + strategy: + matrix: + os: [macos, ubuntu, windows] 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: macos-latest + runs-on: ${{ matrix.os }}-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -99,7 +102,7 @@ jobs: run: flutter test - name: Run integration tests if: ${{ steps.extract_branch.outputs.branch == 'dev' }} - run: flutter test integration_test --coverage -d macos + run: flutter test integration_test --coverage -d ${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} - name: Upload Coverage to CodeCov if: ${{ steps.extract_branch.outputs.branch == 'dev' }} uses: codecov/codecov-action@v3 From 85906fa4f8db99ab07902f820cdde29d7649dd0c Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sun, 17 Nov 2024 23:20:52 +0530 Subject: [PATCH 11/26] conditional run --- .github/workflows/flutter_test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index e55b79c..d576234 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -28,6 +28,10 @@ jobs: windows: ${{ steps.filter.outputs.windows }} steps: # For pull requests it's not necessary to checkout the code + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch - uses: dorny/paths-filter@v3 id: filter with: @@ -58,10 +62,6 @@ jobs: 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: @@ -101,10 +101,10 @@ jobs: - name: Run tests run: flutter test - name: Run integration tests - if: ${{ steps.extract_branch.outputs.branch == 'dev' }} + if: needs.changes.extract_branch.outputs.branch == 'dev' run: flutter test integration_test --coverage -d ${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} - name: Upload Coverage to CodeCov - if: ${{ steps.extract_branch.outputs.branch == 'dev' }} + if: needs.changes.extract_branch.outputs.branch == 'dev' uses: codecov/codecov-action@v3 with: token: ${{secrets.CODECOV_TOKEN}} @@ -113,7 +113,7 @@ jobs: android-linux-build: name: 'Build Android + Linux' needs: [changes, flutter-test] - if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true' }} + if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} runs-on: ubuntu-latest steps: - name: Checkout @@ -164,7 +164,7 @@ jobs: macos-build: name: 'Build Macos' needs: [changes, flutter-test] - if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true' }} + if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} runs-on: macos-latest steps: - name: Checkout @@ -208,7 +208,7 @@ jobs: windows-build: name: 'Build Windows' needs: [changes, flutter-test] - if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true' }} + if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} runs-on: windows-latest steps: - name: Checkout From 0d3379430b5ca7538392e9a6e4d5b0452a87c015 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sun, 17 Nov 2024 23:31:40 +0530 Subject: [PATCH 12/26] shorten workflow file --- .github/workflows/flutter_test.yml | 44 ++++++------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index d576234..6dc3497 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -163,9 +163,12 @@ jobs: macos-build: name: 'Build Macos' + strategy: + matrix: + os: [macos, windows] needs: [changes, flutter-test] - if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} - runs-on: macos-latest + if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} + runs-on: ${{ matrix.os }}-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -191,6 +194,7 @@ jobs: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} build-runner- - name: Cache pods + if: ${{ matrix.os == 'macos'}} uses: actions/cache@v3 with: path: macos/Pods @@ -203,40 +207,8 @@ jobs: - name: Run build_runner run: flutter pub run build_runner build - name: Build macos + if: ${{ matrix.os == 'macos'}} run: flutter build macos - - windows-build: - name: 'Build Windows' - needs: [changes, flutter-test] - if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Flutter action - uses: subosito/flutter-action@v2.16.0 - with: - channel: stable - cache: true - cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" - cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" - pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-:hash:" - pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" - - name: Cache build runner - uses: actions/cache@v4.0.2 - with: - path: | - **/.dart_tool - **/*.g.dart - **/*.mocks.dart - **/*.config.dart - key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} - restore-keys: | - build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} - build-runner- - - name: Download pub dependencies - run: flutter pub get - - name: Run build_runner - run: flutter pub run build_runner build - name: Build windows + if: ${{ matrix.os == 'windows'}} run: flutter build windows \ No newline at end of file From 15956b53438a14d249c1c53a3e7f9733d12f0e59 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sun, 17 Nov 2024 23:53:21 +0530 Subject: [PATCH 13/26] shrink workflow --- .github/workflows/flutter_test.yml | 80 ++++++++---------------------- 1 file changed, 20 insertions(+), 60 deletions(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index 6dc3497..37ac739 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -110,11 +110,14 @@ jobs: token: ${{secrets.CODECOV_TOKEN}} file: coverage/lcov.info - android-linux-build: - name: 'Build Android + Linux' + flutter_build: + name: 'Build flutter' + strategy: + matrix: + os: [macos, windows, ubuntu] needs: [changes, flutter-test] - if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} - runs-on: ubuntu-latest + if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} + runs-on: ${{ matrix.os }}-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -144,57 +147,8 @@ jobs: restore-keys: | build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} build-runner- - - name: Download pub dependencies - run: flutter pub get - - name: Run build_runner - run: flutter pub run build_runner build - - name: Build Android - if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.yaml == 'true' }} - run: | - flutter build apk --debug --flavor dev - - # Run only if test, lib, and linux folder is changed - - name: Install Linux dependencies - if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true' }} - run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev - - name: Build Linux - if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true' }} - run: flutter build linux - - macos-build: - name: 'Build Macos' - strategy: - matrix: - os: [macos, windows] - needs: [changes, flutter-test] - if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} - runs-on: ${{ matrix.os }}-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Flutter action - uses: subosito/flutter-action@v2.16.0 - with: - channel: stable - cache: true - cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" - cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" - pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-:hash:" - pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" - - name: Cache build runner - uses: actions/cache@v4.0.2 - with: - path: | - **/.dart_tool - **/*.g.dart - **/*.mocks.dart - **/*.config.dart - key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} - restore-keys: | - build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} - build-runner- - name: Cache pods - if: ${{ matrix.os == 'macos'}} + if: ${{ (matrix.os == 'macos') && (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true' ) }} uses: actions/cache@v3 with: path: macos/Pods @@ -206,9 +160,15 @@ jobs: run: flutter pub get - name: Run build_runner run: flutter pub run build_runner build - - name: Build macos - if: ${{ matrix.os == 'macos'}} - run: flutter build macos - - name: Build windows - if: ${{ matrix.os == 'windows'}} - run: flutter build windows \ No newline at end of file + - name: Build Android + if: ${{ (matrix.os == 'ubuntu') && (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.yaml == 'true' )}} + run: | + flutter build apk --debug --flavor dev + + # Run only if test, lib, and linux folder is changed + - name: Install Linux dependencies + if: ${{ (matrix.os == 'ubuntu') && (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true') }} + run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev + - name: Build Linux + if: ${{ (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') }} + run: flutter build ${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} \ No newline at end of file From d5d145333c3b918e531c0728045d66b1b9eb46e4 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 00:09:12 +0530 Subject: [PATCH 14/26] output branch properly --- .github/workflows/flutter_test.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index 37ac739..804bf5a 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -26,6 +26,7 @@ jobs: macos: ${{ steps.filter.outputs.macos }} yaml: ${{ steps.filter.outputs.yaml }} windows: ${{ steps.filter.outputs.windows }} + branch: ${{steps.extract_branch.branch}} steps: # For pull requests it's not necessary to checkout the code - name: Extract branch name @@ -101,10 +102,10 @@ jobs: - name: Run tests run: flutter test - name: Run integration tests - if: needs.changes.extract_branch.outputs.branch == 'dev' + if: needs.changes.outputs.branch == 'dev' run: flutter test integration_test --coverage -d ${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} - name: Upload Coverage to CodeCov - if: needs.changes.extract_branch.outputs.branch == 'dev' + if: needs.changes.outputs.branch == 'dev' uses: codecov/codecov-action@v3 with: token: ${{secrets.CODECOV_TOKEN}} @@ -116,7 +117,7 @@ jobs: matrix: os: [macos, windows, ubuntu] needs: [changes, flutter-test] - if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.extract_branch.outputs.branch == 'dev') }} + if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.outputs.branch == 'dev') }} runs-on: ${{ matrix.os }}-latest steps: - name: Checkout @@ -148,7 +149,7 @@ jobs: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} build-runner- - name: Cache pods - if: ${{ (matrix.os == 'macos') && (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true' ) }} + if: ${{ (matrix.os == 'macos') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true' ) }} uses: actions/cache@v3 with: path: macos/Pods @@ -161,14 +162,14 @@ jobs: - name: Run build_runner run: flutter pub run build_runner build - name: Build Android - if: ${{ (matrix.os == 'ubuntu') && (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.yaml == 'true' )}} + if: ${{ (matrix.os == 'ubuntu') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.yaml == 'true' )}} run: | flutter build apk --debug --flavor dev # Run only if test, lib, and linux folder is changed - name: Install Linux dependencies - if: ${{ (matrix.os == 'ubuntu') && (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true') }} + if: ${{ (matrix.os == 'ubuntu') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true') }} run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev - name: Build Linux - if: ${{ (needs.changes.extract_branch.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') }} + if: ${{ (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') }} run: flutter build ${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} \ No newline at end of file From 31a154cffaa75816ae5e38a23d64f10192e13ce2 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 00:11:11 +0530 Subject: [PATCH 15/26] shorten expression --- .github/workflows/flutter_test.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index 804bf5a..547634f 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -19,13 +19,13 @@ jobs: pull-requests: read # Set job outputs to values from filter step outputs: - lib: ${{ steps.filter.outputs.lib }} - test: ${{ steps.filter.outputs.test }} - android: ${{ steps.filter.outputs.android }} - linux: ${{ steps.filter.outputs.linux }} - macos: ${{ steps.filter.outputs.macos }} - yaml: ${{ steps.filter.outputs.yaml }} - windows: ${{ steps.filter.outputs.windows }} + lib: ${{ steps.filter.outputs.lib == 'true' }} + test: ${{ steps.filter.outputs.test == 'true' }} + android: ${{ steps.filter.outputs.android == 'true' }} + linux: ${{ steps.filter.outputs.linux == 'true' }} + macos: ${{ steps.filter.outputs.macos == 'true' }} + yaml: ${{ steps.filter.outputs.yaml == 'true' }} + windows: ${{ steps.filter.outputs.windows == 'true'}} branch: ${{steps.extract_branch.branch}} steps: # For pull requests it's not necessary to checkout the code @@ -58,7 +58,7 @@ jobs: matrix: os: [macos, ubuntu, windows] 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' }} + if: ${{ needs.changes.outputs.lib || needs.changes.outputs.test || needs.changes.outputs.yaml || needs.changes.outputs.android || needs.changes.outputs.linux || needs.changes.outputs.macos || needs.changes.outputs.windows }} runs-on: ${{ matrix.os }}-latest steps: - name: Checkout @@ -117,7 +117,7 @@ jobs: matrix: os: [macos, windows, ubuntu] needs: [changes, flutter-test] - if: ${{ (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') && (needs.changes.outputs.branch == 'dev') }} + if: ${{ (needs.changes.outputs.lib || needs.changes.outputs.test || needs.changes.outputs.android || needs.changes.outputs.linux || needs.changes.outputs.macos || needs.changes.outputs.windows || needs.changes.outputs.yaml ) && (needs.changes.outputs.branch == 'dev') }} runs-on: ${{ matrix.os }}-latest steps: - name: Checkout @@ -149,7 +149,7 @@ jobs: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} build-runner- - name: Cache pods - if: ${{ (matrix.os == 'macos') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true' ) }} + if: ${{ (matrix.os == 'macos') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib || needs.changes.outputs.test || needs.changes.outputs.macos || needs.changes.outputs.yaml ) }} uses: actions/cache@v3 with: path: macos/Pods @@ -162,14 +162,14 @@ jobs: - name: Run build_runner run: flutter pub run build_runner build - name: Build Android - if: ${{ (matrix.os == 'ubuntu') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.yaml == 'true' )}} + if: ${{ (matrix.os == 'ubuntu') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib || needs.changes.outputs.test || needs.changes.outputs.android || needs.changes.outputs.yaml )}} run: | flutter build apk --debug --flavor dev # Run only if test, lib, and linux folder is changed - name: Install Linux dependencies - if: ${{ (matrix.os == 'ubuntu') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true') }} + if: ${{ (matrix.os == 'ubuntu') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib || needs.changes.outputs.test || needs.changes.outputs.linux || needs.changes.outputs.yaml ) }} run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev - name: Build Linux - if: ${{ (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.windows == 'true' || needs.changes.outputs.yaml == 'true') }} + if: ${{ (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib || needs.changes.outputs.test || needs.changes.outputs.linux || needs.changes.outputs.macos || needs.changes.outputs.windows || needs.changes.outputs.yaml ) }} run: flutter build ${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} \ No newline at end of file From 0ef609a7733d6cfa37bf673ac3c40cbbdc8da598 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 00:21:39 +0530 Subject: [PATCH 16/26] corrected output for branch --- .github/workflows/flutter_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index 547634f..3b7dc07 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -26,7 +26,7 @@ jobs: macos: ${{ steps.filter.outputs.macos == 'true' }} yaml: ${{ steps.filter.outputs.yaml == 'true' }} windows: ${{ steps.filter.outputs.windows == 'true'}} - branch: ${{steps.extract_branch.branch}} + branch: ${{steps.extract_branch.outputs.branch}} steps: # For pull requests it's not necessary to checkout the code - name: Extract branch name From 324b7dd1af3b2c22f6bb643dcd1d6e451358a792 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 00:27:14 +0530 Subject: [PATCH 17/26] added delay --- .github/workflows/flutter_test.yml | 5 ++++- integration_test/app_test.dart | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index 3b7dc07..c830fa9 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -25,7 +25,7 @@ jobs: linux: ${{ steps.filter.outputs.linux == 'true' }} macos: ${{ steps.filter.outputs.macos == 'true' }} yaml: ${{ steps.filter.outputs.yaml == 'true' }} - windows: ${{ steps.filter.outputs.windows == 'true'}} + windows: ${{ steps.filter.outputs.windows == 'true' }} branch: ${{steps.extract_branch.outputs.branch}} steps: # For pull requests it's not necessary to checkout the code @@ -101,6 +101,9 @@ jobs: run: flutter pub global activate coverage - name: Run tests run: flutter test + - name: Install Linux dependencies + if: ${{ (matrix.os == 'ubuntu') && (needs.changes.outputs.branch == 'dev') && (needs.changes.outputs.lib || needs.changes.outputs.test || needs.changes.outputs.linux || needs.changes.outputs.yaml ) }} + run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev - name: Run integration tests if: needs.changes.outputs.branch == 'dev' run: flutter test integration_test --coverage -d ${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index 3054da6..ae2b00f 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -53,7 +53,7 @@ void main() { await tester.tap(devicesButton); await tester.pump(); expect(find.byType(AdaptiveListTile), findsAny); - await tester.pumpAndSettle(); + await tester.pumpAndSettle(const Duration(seconds: 5)); await tester.pump(); expect(find.byType(AdaptiveListTile), findsAtLeast(2)); From 4748ecfee8e5ff31d7e22c0a65620e18706852c2 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 22:05:20 +0530 Subject: [PATCH 18/26] increase delay --- integration_test/app_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index ae2b00f..306fe1e 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -53,7 +53,7 @@ void main() { await tester.tap(devicesButton); await tester.pump(); expect(find.byType(AdaptiveListTile), findsAny); - await tester.pumpAndSettle(const Duration(seconds: 5)); + await tester.pumpAndSettle(const Duration(seconds: 10)); await tester.pump(); expect(find.byType(AdaptiveListTile), findsAtLeast(2)); From 06b88a146bafe9875a08eb697be62db2a70cfb64 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 22:38:38 +0530 Subject: [PATCH 19/26] return in case of error --- lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart | 1 + 1 file changed, 1 insertion(+) 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 d829711..512b805 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 @@ -76,6 +76,7 @@ class HostScanBloc extends Bloc { } if (gatewayIp == null) { emit(const HostScanState.error()); + return; } subnet = gatewayIp!.substring(0, gatewayIp!.lastIndexOf('.')); } From ed7f827740a411eebab87efbe88bed091822e195 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 22:55:55 +0530 Subject: [PATCH 20/26] fix tests --- .../host_scan_bloc/host_scan_bloc.dart | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) 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 512b805..426eb9a 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 @@ -49,15 +49,6 @@ class HostScanBloc extends Bloc { devicesSet.clear(); mDnsDevices.clear(); emit(const HostScanState.loadInProgress()); - await initializeWifiParameters(emit); - if (appSettings.runScanOnStartup) { - add(const HostScanEvent.loadScan()); - } else { - add(const HostScanEvent.startNewScan()); - } - } - - Future initializeWifiParameters(Emitter emit) async { String? wifiGatewayIP; try { wifiGatewayIP = await NetworkInfo().getWifiGatewayIP(); @@ -79,6 +70,11 @@ class HostScanBloc extends Bloc { return; } subnet = gatewayIp!.substring(0, gatewayIp!.lastIndexOf('.')); + if (appSettings.runScanOnStartup) { + add(const HostScanEvent.loadScan()); + } else { + add(const HostScanEvent.startNewScan()); + } } Future _startNewScanBuiltInIsolate( From 78763b470e8ca4365812305b0de4cb1e6a76f80a Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 22:57:48 +0530 Subject: [PATCH 21/26] print logs --- lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart | 4 ++++ 1 file changed, 4 insertions(+) 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 426eb9a..bcde242 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 @@ -58,12 +58,16 @@ class HostScanBloc extends Bloc { ip = await NetworkInfo().getWifiIP(); if (appSettings.customSubnet.isNotEmpty) { gatewayIp = appSettings.customSubnet; + debugPrint('Taking gatewayIp from appSettings: $gatewayIp'); } else if (wifiGatewayIP != null) { gatewayIp = wifiGatewayIP; + debugPrint( + 'Taking gatewayIp from NetworkInfo().getWifiGatewayIP(): $gatewayIp'); } else { // NetworkInfo().getWifiGatewayIP() is null on android 35, so fail-safe // to NetworkInfo().getWifiIP() gatewayIp = ip; + debugPrint('Taking gatewayIp from NetworkInfo().getWifiIP(): $gatewayIp'); } if (gatewayIp == null) { emit(const HostScanState.error()); From 26615e088a77d781ef4423c6381476e1b51abfe4 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 22:58:09 +0530 Subject: [PATCH 22/26] fix analyzer --- lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 bcde242..0dc1690 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 @@ -62,7 +62,8 @@ class HostScanBloc extends Bloc { } else if (wifiGatewayIP != null) { gatewayIp = wifiGatewayIP; debugPrint( - 'Taking gatewayIp from NetworkInfo().getWifiGatewayIP(): $gatewayIp'); + 'Taking gatewayIp from NetworkInfo().getWifiGatewayIP(): $gatewayIp', + ); } else { // NetworkInfo().getWifiGatewayIP() is null on android 35, so fail-safe // to NetworkInfo().getWifiIP() From 85ada084b3272526a4eef0dfb17796c98e9d657e Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 23:28:49 +0530 Subject: [PATCH 23/26] localInterface added --- lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart | 5 +++-- macos/Podfile.lock | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) 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 0dc1690..bf13747 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 @@ -46,16 +46,17 @@ class HostScanBloc extends Bloc { Initialized event, Emitter emit, ) async { + final info = NetworkInfo(); devicesSet.clear(); mDnsDevices.clear(); emit(const HostScanState.loadInProgress()); String? wifiGatewayIP; try { - wifiGatewayIP = await NetworkInfo().getWifiGatewayIP(); + wifiGatewayIP = await info.getWifiGatewayIP(); } catch (e) { debugPrint('Unimplemented error $e'); } - ip = await NetworkInfo().getWifiIP(); + ip = await info.getWifiIP(); if (appSettings.customSubnet.isNotEmpty) { gatewayIp = appSettings.customSubnet; debugPrint('Taking gatewayIp from appSettings: $gatewayIp'); diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 40a24a6..632a113 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -61,14 +61,14 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos SPEC CHECKSUMS: - flutter_local_notifications: 4b427ffabf278fc6ea9484c97505e231166927a5 + flutter_local_notifications: 7062189aabf7f50938a7b8b6614ffa97656eb0bf flutter_timezone: 6b906d1740654acb16e50b639835628fea851037 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 isar_flutter_libs: 43385c99864c168fadba7c9adeddc5d38838ca6a - network_info_plus: f4fbc7877ab7b3294500d9441dfa53cd54972d05 + network_info_plus: 2cb02d8435635eae13b3b79279681985121cf30c nsd_macos: 1a38a38a33adbb396b4c6f303bc076073514cadc - package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce + package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 From e8a5cc713ed95912d0219c2032faac41641a9166 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Mon, 18 Nov 2024 23:28:53 +0530 Subject: [PATCH 24/26] localInterface added --- .../host_scan_page/host_scan_bloc/host_scan_bloc.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 bf13747..2fe3adc 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 @@ -57,6 +57,7 @@ class HostScanBloc extends Bloc { debugPrint('Unimplemented error $e'); } ip = await info.getWifiIP(); + final interface = await NetInterface.localInterface(); if (appSettings.customSubnet.isNotEmpty) { gatewayIp = appSettings.customSubnet; debugPrint('Taking gatewayIp from appSettings: $gatewayIp'); @@ -65,11 +66,16 @@ class HostScanBloc extends Bloc { debugPrint( 'Taking gatewayIp from NetworkInfo().getWifiGatewayIP(): $gatewayIp', ); - } else { + } else if (ip != null) { // NetworkInfo().getWifiGatewayIP() is null on android 35, so fail-safe // to NetworkInfo().getWifiIP() gatewayIp = ip; debugPrint('Taking gatewayIp from NetworkInfo().getWifiIP(): $gatewayIp'); + } else if (interface != null) { + gatewayIp = interface.ipAddress; + debugPrint( + 'Taking gatewayIp from NetInterface.localInterface(): $gatewayIp', + ); } if (gatewayIp == null) { emit(const HostScanState.error()); From 03733cfa0f5fb6980f2bbdd5e353a1edbbeee728 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Wed, 20 Nov 2024 09:19:24 +0530 Subject: [PATCH 25/26] fix for tests --- lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 2fe3adc..1334a74 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 @@ -79,9 +79,13 @@ class HostScanBloc extends Bloc { } if (gatewayIp == null) { emit(const HostScanState.error()); - return; + return Future.error('Can not get wifi details'); } subnet = gatewayIp!.substring(0, gatewayIp!.lastIndexOf('.')); + if (subnet == null) { + emit(const HostScanState.error()); + return Future.error('Can not get wifi details'); + } if (appSettings.runScanOnStartup) { add(const HostScanEvent.loadScan()); } else { From 68fb627154865a19c7d22a7e9fd2931bd5319720 Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sun, 12 Jan 2025 16:31:50 +0530 Subject: [PATCH 26/26] check failure --- integration_test/app_test.dart | 2 +- macos/Podfile.lock | 4 +- macos/Runner/AppDelegate.swift | 4 + pubspec.lock | 204 +++++++++++++++++---------------- 4 files changed, 113 insertions(+), 101 deletions(-) diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index 306fe1e..bfa9468 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -53,7 +53,7 @@ void main() { await tester.tap(devicesButton); await tester.pump(); expect(find.byType(AdaptiveListTile), findsAny); - await tester.pumpAndSettle(const Duration(seconds: 10)); + await tester.pumpAndSettle(const Duration(seconds: 20)); await tester.pump(); expect(find.byType(AdaptiveListTile), findsAtLeast(2)); diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 632a113..6921756 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -4,7 +4,7 @@ PODS: - flutter_timezone (0.1.0): - FlutterMacOS - FlutterMacOS (1.0.0) - - in_app_review (0.2.0): + - in_app_review (2.0.0): - FlutterMacOS - isar_flutter_libs (1.0.0): - FlutterMacOS @@ -64,7 +64,7 @@ SPEC CHECKSUMS: flutter_local_notifications: 7062189aabf7f50938a7b8b6614ffa97656eb0bf flutter_timezone: 6b906d1740654acb16e50b639835628fea851037 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 + in_app_review: a6a031b9acd03c7d103e341aa334adf2c493fb93 isar_flutter_libs: 43385c99864c168fadba7c9adeddc5d38838ca6a network_info_plus: 2cb02d8435635eae13b3b79279681985121cf30c nsd_macos: 1a38a38a33adbb396b4c6f303bc076073514cadc diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift index 8e02df2..b3c1761 100644 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/pubspec.lock b/pubspec.lock index 98afa81..8818fa4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,23 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" url: "https://pub.dev" source: hosted - version: "72.0.0" + version: "76.0.0" _macros: dependency: transitive description: dart source: sdk - version: "0.3.2" + version: "0.3.3" analyzer: dependency: "direct overridden" description: name: analyzer - sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.11.0" ansicolor: dependency: transitive description: @@ -34,10 +34,10 @@ packages: dependency: transitive description: name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + sha256: "08064924cbf0ab88280a0c3f60db9dd24fec693927e725ecb176f16c629d1cb8" url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "4.0.1" args: dependency: transitive description: @@ -178,10 +178,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" convert: dependency: transitive description: @@ -266,10 +266,10 @@ packages: dependency: "direct main" description: name: external_app_launcher - sha256: a80847a8e24cce37f1c953ec20a9600c3b12167e279b5868945e880cea717bf7 + sha256: "69d843ae16598cbf86be8d65ae5f206bb403fbfb75ca9aaaa9ea91b15b040571" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" fake_async: dependency: transitive description: @@ -364,10 +364,10 @@ packages: dependency: "direct main" description: name: flutter_native_splash - sha256: ee5c9bd2b74ea8676442fd4ab876b5d41681df49276488854d6c81a5377c0ef1 + sha256: "1152ab0067ca5a2ebeb862fe0a762057202cceb22b7e62692dcbabf6483891bb" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.3" flutter_test: dependency: "direct dev" description: flutter @@ -419,10 +419,10 @@ packages: dependency: "direct main" description: name: get_it - sha256: c49895c1ecb0ee2a0ec568d39de882e2c299ba26355aa6744ab1001f98cebd15 + sha256: f126a3e286b7f5b578bf436d5592968706c4c1de28a228b870ce375d9f743103 url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.0.3" glob: dependency: transitive description: @@ -467,26 +467,26 @@ packages: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.1" image: dependency: transitive description: name: image - sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d + sha256: "20842a5ad1555be624c314b0c0cc0566e8ece412f61e859a42efeb6d4101a26c" url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.5.0" in_app_review: dependency: "direct main" description: name: in_app_review - sha256: "99869244d09adc76af16bf8fd731dd13cef58ecafd5917847589c49f378cbb30" + sha256: "36a06771b88fb0e79985b15e7f2ac0f1142e903fe72517f3c055d78bc3bc1819" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.10" in_app_review_platform_interface: dependency: transitive description: @@ -520,18 +520,18 @@ packages: dependency: transitive description: name: intl - sha256: "99f282cb0e02edcbbf8c6b3bbc7c90b65635156c412e58f3975a7e55284ce685" + sha256: "00f33b908655e606b86d2ade4710a231b802eec6f11e87e4ea3783fd72077a50" url: "https://pub.dev" source: hosted - version: "0.20.0" + version: "0.20.1" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" isar: dependency: "direct main" description: @@ -584,26 +584,26 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c url: "https://pub.dev" source: hosted - version: "6.8.0" + version: "6.9.0" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -632,10 +632,10 @@ packages: dependency: transitive description: name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" url: "https://pub.dev" source: hosted - version: "0.1.2-main.4" + version: "0.1.3-main.0" matcher: dependency: transitive description: @@ -688,18 +688,18 @@ packages: dependency: "direct main" description: name: network_info_plus - sha256: bf9e39e523e9951d741868dc33ac386b0bc24301e9b7c8a7d60dbc34879150a8 + sha256: "936e9dc9d78ba84f84147c28aa044722057e2eeb7777fa3d66e77f918c0e3b5b" url: "https://pub.dev" source: hosted - version: "6.1.1" + version: "6.1.2" network_info_plus_platform_interface: dependency: transitive description: name: network_info_plus_platform_interface - sha256: b7f35f4a7baef511159e524499f3c15464a49faa5ec10e92ee0bce265e664906 + sha256: "7e7496a8a9d8136859b8881affc613c4a21304afeb6c324bcefc4bd0aff6b94b" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" network_tools: dependency: transitive description: @@ -736,66 +736,66 @@ packages: dependency: transitive description: name: nsd_android - sha256: "9e2c1d31a36c9b7f5bad6329f3d9e07c7f09e7a7394aa2f54db701516ac149eb" + sha256: "1309cd47d02c99bd305219f0a226644f9f4a964d341c3d6730cebb906bb1ec78" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.2" nsd_ios: dependency: transitive description: name: nsd_ios - sha256: "43b53bdcf0cedf7c481125e6a7e4a88c745de2e48a205404be3b4e91d77798b5" + sha256: "562fffe753543a65190344d3acd0ed80d96c571ac1a05bf10780c5584b5055ac" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" nsd_macos: dependency: transitive description: name: nsd_macos - sha256: db1a07f4baf358b9d72ff9eb308c83419c60a57ef8c6d1e0369075825b835b43 + sha256: "47cd355d84009befe02710c72bf1c1999b24d5f3fb3a3d914f8b77bcaca42542" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" nsd_platform_interface: dependency: transitive description: name: nsd_platform_interface - sha256: "726bba1b93e18a37252623fd6490bafe6f3d7c225bff50421b7eeb7c47704d4b" + sha256: "7220c8e0beeacd06c180fefcd6bb708415ed889c76f656e75ac633d09ceaa761" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.1" nsd_windows: dependency: transitive description: name: nsd_windows - sha256: "78910ac981ae0ab975cf4c30895512576220aed3dd57c3378a05eebe8e13ff88" + sha256: "68b4a256b0be258dbbad0ae789f2e8838d0935a353dac86b17c14c1a05df4ecd" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" package_config: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" package_info_plus: dependency: "direct main" description: name: package_info_plus - sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce + sha256: "70c421fe9d9cc1a9a7f3b05ae56befd469fe4f8daa3b484823141a55442d858d" url: "https://pub.dev" source: hosted - version: "8.1.1" + version: "8.1.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 + sha256: a5ef9986efc7bf772f2696183a3992615baa76c1ffb1189318dd8803778fb05b url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" path: dependency: transitive description: @@ -816,18 +816,18 @@ packages: dependency: transitive description: name: path_provider_android - sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a + sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" url: "https://pub.dev" source: hosted - version: "2.2.12" + version: "2.2.15" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -856,10 +856,10 @@ packages: dependency: "direct main" description: name: percent_indicator - sha256: c37099ad833a883c9d71782321cb65c3a848c21b6939b6185f0ff6640d05814c + sha256: "0d77d5c6fa9b7f60202cedf748b568ba9ba38d3f30405d6ceae4da76f5185462" url: "https://pub.dev" source: hosted - version: "4.2.3" + version: "4.2.4" permission_handler: dependency: "direct main" description: @@ -888,10 +888,10 @@ packages: dependency: transitive description: name: permission_handler_html - sha256: af26edbbb1f2674af65a8f4b56e1a6f526156bc273d0e65dd8075fab51c78851 + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" url: "https://pub.dev" source: hosted - version: "0.1.3+2" + version: "0.1.3+5" permission_handler_platform_interface: dependency: transitive description: @@ -940,6 +940,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + posix: + dependency: transitive + description: + name: posix + sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a + url: "https://pub.dev" + source: hosted + version: "6.0.1" process: dependency: transitive description: @@ -968,10 +976,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: @@ -992,10 +1000,10 @@ packages: dependency: transitive description: name: sembast - sha256: "61f893e50fe2fa7d14529d275d45ac31871d7ad2ae3a745f9aa3afc0b447d75b" + sha256: f45edc5e34ed53d6e3d70df664b182e9abcf9c784f48184e5be4c079d2b865d6 url: "https://pub.dev" source: hosted - version: "3.7.5+2" + version: "3.8.0+1" shared_preferences: dependency: "direct main" description: @@ -1008,18 +1016,18 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" + sha256: "02a7d8a9ef346c9af715811b01fbd8e27845ad2c41148eefd31321471b41863d" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.0" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" + sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.5.4" shared_preferences_linux: dependency: transitive description: @@ -1056,23 +1064,23 @@ packages: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_gen: dependency: transitive description: @@ -1109,10 +1117,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -1133,10 +1141,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" sync_http: dependency: transitive description: @@ -1165,18 +1173,18 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" time: dependency: transitive description: name: time - sha256: ad8e018a6c9db36cb917a031853a1aae49467a93e0d464683e029537d848c221 + sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" timezone: dependency: "direct main" description: @@ -1189,10 +1197,10 @@ packages: dependency: transitive description: name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" typed_data: dependency: transitive description: @@ -1229,10 +1237,10 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.3.1" + version: "6.3.2" url_launcher_linux: dependency: transitive description: @@ -1245,10 +1253,10 @@ packages: dependency: transitive description: name: url_launcher_macos - sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" url_launcher_platform_interface: dependency: transitive description: @@ -1293,10 +1301,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" watcher: dependency: transitive description: @@ -1309,10 +1317,10 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.1.0" web_socket: dependency: transitive description: @@ -1333,18 +1341,18 @@ packages: dependency: transitive description: name: webdriver - sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.4" win32: dependency: transitive description: name: win32 - sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" + sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69" url: "https://pub.dev" source: hosted - version: "5.8.0" + version: "5.9.0" xdg_directories: dependency: transitive description: @@ -1365,10 +1373,10 @@ packages: dependency: transitive description: name: xxh3 - sha256: cbeb0e1d10f4c6bf67b650f395eac0cc689425b5efc2ba0cc3d3e069a0beaeec + sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" yaml: dependency: transitive description: