post<T> function

Future<T> post<T>(
  1. FutureOr<T> action()
)

Runs given action no sooner than in the next event-loop iteration, after all micro-tasks have run.

Implementation

Future<T> post<T>(FutureOr<T> Function() action) =>
    Future.delayed(Duration.zero, action);