Future<T> - интерфейс Future<T>

A Future is used to obtain a value sometime in the future. Receivers of a Future obtain the value by passing a callback to then. For example:

Future<int> future = getFutureFromSomewhere(); future.then((value) {

print("I received the number " + value);

});