nextFrame static method

Future nextFrame(
  1. VoidCallback action
)

Runs delayed Future with zero Duration so action will be performed next frame.

Implementation

static Future nextFrame(VoidCallback action) =>
    Future.delayed(const Duration(), action);