Библиотеки » Основная библиотека (dart:core) » Completer<T>
Completer<T> - интерфейс Completer<T>
A Completer
is used to produce Future
s and supply their value when it
becomes available.
A service that provides values to callers, and wants to return Future
s can
use a Completer
as follows:
Completer completer = new Completer(); // send future object back to client... return completer.future; ...
// later when value is available, call: completer.complete(value);
// alternatively, if the service cannot produce the value, it // can provide an exception: completer.completeException(exception);
-
Конструкторы, фабрики
-
Методы