Last active
September 22, 2019 20:46
-
-
Save Zambrella/1c7dc847afd58618682bd65ccb97c378 to your computer and use it in GitHub Desktop.
Getting the response from an API call
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
import 'constants.dart'; | |
import 'package:http/http.dart' as http; | |
const String kURL = 'https://api.opendota.com/api/distributions/'; | |
class Brain { | |
Future<dynamic> getCumulativeCount() async { | |
http.Response response = await http.get('$kURL?apikey=$kAPIKey'); | |
print(response.body); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment