fluttercommunity / plus_plugins

Flutter Community Plus Plugins
BSD 3-Clause "New" or "Revised" License
1.62k stars 985 forks source link

[Bug]: Not able to get Ip Address if network is connect to mobile data #3321

Closed khanjasir90 closed 1 month ago

khanjasir90 commented 1 month ago

Platform

Iphone 13

Plugin

network_info_plus

Version

^4.0.1

Flutter SDK

3.22.1

Steps to reproduce

  1. I am not able to get Ip address when connected to mobile data. it returns null

Code Sample

final ip = await _network.getWifiIP();
print(ip) // null when connected to mobile data.

Logs

None

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.3 23D56 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.88.1)

Checklist before submitting a bug

miquelbeltran commented 1 month ago

Not a bug, works as intended. The implementation uses enumerateWifiAddresses and the method is called getWifiIP.

There is already a feature request here: https://github.com/fluttercommunity/plus_plugins/issues/2036 and here https://github.com/fluttercommunity/plus_plugins/issues/420 so closing this one.