From f4d0cac08172fb410170b72f22510cdcc0fa98de Mon Sep 17 00:00:00 2001 From: git-elliot Date: Sat, 16 Nov 2024 21:57:14 +0530 Subject: [PATCH 1/2] 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 2/2] 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"