onPostframe function

void onPostframe(
  1. VoidCallback callback
)

Implementation

void onPostframe(VoidCallback callback) {
  WidgetsBinding.instance.ensureVisualUpdate();
  WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
    callback();
  });
}