Last active
April 13, 2019 16:58
-
-
Save hjJunior/7e6453f0c586050e3697d1f5b37d89bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class MyIp { | |
| final _client = Client(); | |
| Future<String> get ipAddress async { | |
| final apiResult = await _client.get('https://api.ipify.org/?format=json'); | |
| return json.decode(apiResult.body)['ip']; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment