Simplest way for apis integration in flutter without models controller

Published: 31 March 2024
on channel: Stars Solutions
40
2

Simplest way for apis integration in flutter without any models controllers even future builders, You can fetch any data in this way .
*api function below if you face any issue you can comment on video i will reach as soon i can










Function: getSlider()async{
var request = http.Request('GET', Uri.parse(your api urls));


http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
// print(await response.stream.bytesToString());
//customize data according to our json
var res = await response.stream.bytesToString();
var body = jsonDecode(res);

setState(() {
//our list
data= body['response']['sliders'];
print("data = ${data}");
isLoading =false;
});
}
else {
print(response.reasonPhrase);
setState(() {
isLoading=false;
});
}

}


Watch video Simplest way for apis integration in flutter without models controller online without registration, duration hours minute second in high quality. This video was added by user Stars Solutions 31 March 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 40 once and liked it 2 people.