flush method
Waits for all pending operations to finish, then completes the future.
Each call to flush will await pending operations made before the call. Operations started after this flush call will not be awaited by the returned future.
Implementation
Future<void> flush() {
return _submitWorkFunction(() {}, 'flush');
}