How to get device IP in Dart/Flutter

前端 未结 8 840
孤城傲影
孤城傲影 2021-02-13 21:01

I am currently writing an app where the user needs to know the IP address of their phone/tablet. Where would I find this information?

I only want to know what the local

8条回答
  •  旧巷少年郎
    2021-02-13 21:56

    It seems that Dart doesn't have a solution to get your own ip address. Searching for a solution I came across the rest api https://ipify.org to get my public address. Hope it helps.

提交回复
热议问题