Last active
July 17, 2019 00:21
-
-
Save kwalrath/d280cf4a971fac630b43d74808368170 to your computer and use it in GitHub Desktop.
event loop example
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
| RaisedButton( | |
| child: Text('Click me'), | |
| onPressed: () { | |
| final myFuture = http.get('https://example.com'); | |
| myFuture.then((response) { | |
| if (response.statusCode == 200) { | |
| print('Success!'); | |
| } | |
| }); | |
| }, | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment