Created
December 7, 2019 21:13
-
-
Save Classy-Bear/b1f293c32fdb321616aea9f3cc3a2abd 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
Future getData() async { | |
http.Response response = await http.get("https://reqres.in/api/users"); | |
if (response.statusCode == HttpStatus.ok) { | |
var result = jsonDecode(response.body); | |
return result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment