Skip to content

Commit

Permalink
print logs
Browse files Browse the repository at this point in the history
  • Loading branch information
git-elliot committed Nov 18, 2024
1 parent ed7f827 commit 78763b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 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,12 +58,16 @@ class HostScanBloc extends Bloc<HostScanEvent, HostScanState> {
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());
Expand Down

0 comments on commit 78763b4

Please sign in to comment.