Created
December 12, 2018 00:39
-
-
Save chalin/04bb4334985107cddcd021322398c918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'dart:html'; | |
void main() { | |
_getIPAddress() async { | |
final url = 'https://httpbin.org/ip'; | |
var request = await HttpRequest.request(url); | |
String ip = json.decode(request.responseText)['origin']; | |
print(ip); | |
} | |
_getIPAddress(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment