Skip to content

Instantly share code, notes, and snippets.

@marcossevilla
Created December 12, 2020 05:49
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 marcossevilla/e251655755fc43251722a19cbce37ab3 to your computer and use it in GitHub Desktop.
Save marcossevilla/e251655755fc43251722a19cbce37ab3 to your computer and use it in GitHub Desktop.
class API {
static const url = 'url_to_my_api.dev/api';
}
Future callToAPI() async {
await http.get(API.url);
}
Future anotherCallToAPI() async {
await http.get('${API.url}/other');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment