import 'dart:async'; final Completer halfwayPointCompleter = Completer(); void main() async { print('getting started'); calculateSomeNumbers(10).then((result) => print(result)); // async int halfwayPoint = await halfwayPointCompleter.future; print(halfwayPoint); // this will print before the above function completes because it's waiting for the //halfwayPointCompleter to complete, which completes halfway through } //function is useless, but it's just an example. Future calculateSomeNumbers(int max) async { for (int i = 0; i < max; i++) { await Future.delayed(Duration(milliseconds: 500)); if (i == max ~/ 2) { // ~/ is division with rounding. It returns an int. halfwayPointCompleter .complete(i); // this makes the future return at this point. } } return max; }