Skip to content

Commit

Permalink
assign ip address from localinterface
Browse files Browse the repository at this point in the history
  • Loading branch information
git-elliot committed Jan 15, 2025
1 parent 89960e2 commit 6571b28
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class HostScanBloc extends Bloc<HostScanEvent, HostScanState> {
debugPrint('Unimplemented error $e');
}

ip = await info.getWifiIP();
final interface = await NetInterface.localInterface();
ip = (await info.getWifiIP()) ?? interface?.ipAddress;
debugPrint(
'Local Network Id: ${interface?.networkId} and ip: ${interface?.ipAddress}');
if (appSettings.customSubnet.isNotEmpty) {
Expand Down

0 comments on commit 6571b28

Please sign in to comment.