📱 Flutter
Beginner
What is a Future in Dart?
Answer
A Future in Dart represents a value or error that will be available at some point in the future — similar to a Promise in JavaScript. It is used for asynchronous operations like network requests or file reads that take time to complete. You work with Futures using async/await for readable sequential code, or the .then(), .catchError() chain. Futures complete exactly once with either a value or an error.