Created
October 24, 2019 06:07
-
-
Save pdslly/de9a08e094c83e52475dbd7fcd395883 to your computer and use it in GitHub Desktop.
dart_futures
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
RaisedButton( | |
onPressed: () { | |
final myFuture = http.get('https://my.image.url'); | |
myFuture.then((resp) { | |
setImage(resp); | |
}); | |
}, | |
child: Text('Click me!'), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment