Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Not getting local IP Web APP #18

Open
SwenWallnoefer opened this issue May 4, 2020 · 3 comments
Open

Not getting local IP Web APP #18

SwenWallnoefer opened this issue May 4, 2020 · 3 comments

Comments

@SwenWallnoefer
Copy link

Im trying to get the local ip address in a Flutter Web app. I use get_ip 0.4.0 - (it states it is working under flutter web).

I have this function (basicaly copied your example):

Future initPlatformState() async {
print("Test");
String ipAddress;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
ipAddress = await GetIp.ipAddress;
} on PlatformException {
ipAddress = 'Failed to get ipAddress.';
} on Exception {
print("Exception");
}

print("Ip: $ipAddress");

}
and i call it in initState of main.dart.

The console just has the output "Test", it does not output the ip or "Exception".
I'm running the app on MacOs.

@krisleland
Copy link

I'm seeing the same behavior. Just hangs forever.

@zhubinsheng
Copy link

人家没说可以支持web端啊

@marianoarga
Copy link

Same problem

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

No branches or pull requests

4 participants