postFrame method
Schedule action to run after the current frame with default parameters.
Includes a built-in predicate that checks if the widget is still mounted.
Implementation
Future<void> postFrame(
FutureOr<void> Function() action, {
List<ScrollController> scrollControllers = const [],
int maxWaitFrames = 5,
bool waitForEndOfFrame = true,
int endOfFramePasses = 2,
}) {
return PostFrame.postFrame(
action,
scrollControllers: scrollControllers,
maxWaitFrames: maxWaitFrames,
waitForEndOfFrame: waitForEndOfFrame,
endOfFramePasses: endOfFramePasses,
);
}