void complete(
[value]
)

Completes future with the supplied values.

The value must be either a value of type T or a future of type Future<T>.

If the value is itself a future, the completer will wait for that future to complete, and complete with the same result, whether it is a success or an error.

Calling complete or completeError must not be done more than once.

All listeners on the future are informed about the value.

Source

/**
 * Completes [future] with the supplied values.
 *
 * The value must be either a value of type [T]
 * or a future of type `Future<T>`.
 *
 * If the value is itself a future, the completer will wait for that future
 * to complete, and complete with the same result, whether it is a success
 * or an error.
 *
 * Calling `complete` or [completeError] must not be done more than once.
 *
 * All listeners on the future are informed about the value.
 */
void complete([value]);