There is no way to return a value from forEach . Just use a for loop instead. On top of that, the Dart style guide specifically recommends using a for loop over a forEach unless you can reuse an existing function.
There is no way to return a value from forEach . Just use a for loop instead. On top of that, the Dart style guide specifically recommends using a for loop over a forEach unless you can reuse an existing function.