What is then in Dart?

then<R> method Null safety Register callbacks to be called when this future completes . When this future completes with a value, the onValue callback will be called with that value. If this future is already completed, the callback will not be called immediately, but will be scheduled in a later microtask.

Read more