I want to create a weather widget app by flutter but i am finding it difficult to do so as there is limited content on flutter. So if anyone knows how to Call , share your k
It could help someone, click here for official doc
1. Making Http Requests; import 'dart:io';
var httpClient = new HttpClient();
Create the client.
Construct the Uri.
Invoke the operation, and await the request object. Optionally,
configure the headers and body of the request.
Close the request, and await the response.
Decode the response
get() async {
var httpClient = new HttpClient();
var uri = new Uri.http(
'example.com', '/path1/path2', {'param1': '42', 'param2': 'foo'});
var request = await httpClient.getUrl(uri);
var response = await request.close();
var responseBody = await response.transform(UTF8.decoder).join();
Map data = JSON.decode(responseBody);
}