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

Dev -> Main #213

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Dev -> Main #213

wants to merge 35 commits into from

Conversation

git-elliot
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 41.37931% with 17 lines in your changes missing coverage. Please review.

Project coverage is 35.70%. Comparing base (73f720a) to head (03733cf).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../host_scan_page/host_scan_bloc/host_scan_bloc.dart 45.00% 11 Missing ⚠️
lib/models/wifi_info.dart 25.00% 3 Missing ⚠️
lib/repository/notification_service.dart 33.33% 2 Missing ⚠️
lib/pages/home_page.dart 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #213      +/-   ##
==========================================
- Coverage   35.76%   35.70%   -0.07%     
==========================================
  Files          47       47              
  Lines        1535     1549      +14     
==========================================
+ Hits          549      553       +4     
- Misses        986      996      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@bekkach bekkach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class _WifiDetailState extends State {
Future fetchWifiDetails() async {
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('Error fetching Wi-Fi gateway IP: $e');
}

final gatewayIp = appSettings.customSubnet.isNotEmpty
    ? appSettings.customSubnet
    : (wifiGatewayIP ?? wifiIP) ?? '';

final bool isLocationOn = (Platform.isAndroid || Platform.isIOS) &&
    await Permission.location.serviceStatus.isEnabled;

_wifiInfo = WifiInfo(
  ip: wifiIP,
  bssid: wifiBSSID,
  ssid: wifiName,
  gateway: gatewayIp,
  isLocationEnabled: isLocationOn,
);

debugPrint("Wi-Fi Details: $_wifiInfo");

}
}

@bekkach
Copy link

bekkach commented Jan 5, 2025

Your code seems to have an issue on line 50. Based on what you've shared, here's a quick analysis and possible fixes.Syntax Issue: In your conditional assignment to gatewayIp, there is a redundant colon (:) that could be causing a syntax error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants