You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
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");
}
}
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.
The text was updated successfully, but these errors were encountered: