Intermediate
Flutter
Q74 / 100
What is a Completer in Dart?
Correct! Well done.
Incorrect.
The correct answer is B) A class that allows manually controlling a Future — you create the Future and resolve it later with complete() or completeError()
B
Correct Answer
A class that allows manually controlling a Future — you create the Future and resolve it later with complete() or completeError()
Explanation
Completer<T> gives you control over a Future. You create one with Completer<T>(), expose completer.future, and later call completer.complete(value) or completer.completeError(error). Useful when adapting callback-based APIs to Futures.
Progress
74/100