Skip to content

Instantly share code, notes, and snippets.

@Classy-Bear
Created December 7, 2019 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Classy-Bear/b1f293c32fdb321616aea9f3cc3a2abd to your computer and use it in GitHub Desktop.
Save Classy-Bear/b1f293c32fdb321616aea9f3cc3a2abd to your computer and use it in GitHub Desktop.
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