sgon00
sgon00

Reputation: 5777

How to get client's IP address from angulardart?

How to get client's IP address from angulardart? I failed to find this out by google.

Upvotes: 0

Views: 185

Answers (1)

ebelair
ebelair

Reputation: 884

As alternative/temporary solution, you can use ipify api to retrieve the ip:

var client = new BrowserClient();
var response = await client.get('https://api.ipify.org?format=json');

print('Response status: ${response.statusCode}');
print('Response body: ${response.body}');

Upvotes: 1

Related Questions