Hi
I am fairly new to Flutter and I can´t seem to figure out how to consume the HttpDataSource. I have set the Authenticator up to gp fetch me a valid token from my API and I then pass in the token to the ds.getList method. But I don´t understand how I grab the items in the list after the method returns. For now I am doing this but it returns a Future Stream object. How do I turn that into my list of returned items?
await ds.getList('device', token:token).then((onValue){
print(onValue); //Contains future stream
});
Any chance you could point me in the right direction.
Best regards
Henrik
Hi
I am fairly new to Flutter and I can´t seem to figure out how to consume the HttpDataSource. I have set the Authenticator up to gp fetch me a valid token from my API and I then pass in the token to the ds.getList method. But I don´t understand how I grab the items in the list after the method returns. For now I am doing this but it returns a Future Stream object. How do I turn that into my list of returned items?
await ds.getList('device', token:token).then((onValue){
print(onValue); //Contains future stream
});
Any chance you could point me in the right direction.
Best regards
Henrik