Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for windows and beta lane #210

Merged
merged 4 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions android/fastlane/metadata/android/en-US/changelogs/31.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Compatibility issues fixed for windows
Scan slowness improved
8 changes: 7 additions & 1 deletion lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ class _WifiDetailState extends State<HomePage> {
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(
Expand Down
7 changes: 6 additions & 1 deletion lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ class HostScanBloc extends Bloc<HostScanEvent, HostScanState> {
}

Future<void> initializeWifiParameters(Emitter<HostScanState> 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;
Expand Down
3 changes: 3 additions & 0 deletions lib/repository/notification_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class NotificationService {
StreamController<String?>.broadcast();

static Future<void> initNotification() async {
if (Platform.isWindows) return Future.value();
await _configureLocalTimeZone();
final NotificationAppLaunchDetails? notificationAppLaunchDetails =
!kIsWeb && Platform.isLinux
Expand Down Expand Up @@ -141,6 +142,7 @@ class NotificationService {
}

static Future<void> showNotificationWithActions() async {
if (Platform.isWindows) return Future.value();
const AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
'your channel id',
Expand Down Expand Up @@ -193,6 +195,7 @@ class NotificationService {
}

static Future<void> grantPermissions() async {
if (Platform.isWindows) return Future.value();
await _isAndroidPermissionGranted();
await _requestPermissions();
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down