For client.dart instead of using the raw address value I'm trying to use InternetAddress.lookup from some quick local testing that should continue to work with ipv4 addresses and potentially resolve for things like computer names.
For network_info.dart I removed the commented out code since that is persisted in git and shouldn't need to be there. I also attempted to address this issue https://github.com/Tarmslitaren/FrosthavenAssistant/issues/154 and at least the issue I was running into on my local where it was picking up on the WSL virtual ethernet adapter has been resolved. I don't think it is the cleanest since we are still doing it in a catch. I did this by adding a filter on veth to attempt to filter out the virtual ethernet adapters. Additionally, I noticed that inside the condition the break statement was only in the inner loop not for the outer loop, which resulted in the last adapter matching the criteria to be used instead of the first so I added a break statement if the inner loop finds and acceptable value.
For client.dart instead of using the raw address value I'm trying to use InternetAddress.lookup from some quick local testing that should continue to work with ipv4 addresses and potentially resolve for things like computer names.
For network_info.dart I removed the commented out code since that is persisted in git and shouldn't need to be there. I also attempted to address this issue https://github.com/Tarmslitaren/FrosthavenAssistant/issues/154 and at least the issue I was running into on my local where it was picking up on the WSL virtual ethernet adapter has been resolved. I don't think it is the cleanest since we are still doing it in a catch. I did this by adding a filter on veth to attempt to filter out the virtual ethernet adapters. Additionally, I noticed that inside the condition the break statement was only in the inner loop not for the outer loop, which resulted in the last adapter matching the criteria to be used instead of the first so I added a break statement if the inner loop finds and acceptable value.