What is the point for using "Future" in Flutter while we do also have "asyn-await"?

115 Views Asked by At

I am new to Flutter coming from a JavaScript world. In JS we also use async-await mechanism for asynchronous programming. But I noticed that in Dart/Flutter there is another thing named Future that sometimes they combine it with async-awai like following:

Future<T> function() async{ return T = await some_func();}

I can't distinguish between their concepts and use cases in Dart/Flutter. When should we use Future and when async-await and when we would combine both?

0

There are 0 best solutions below