setStateAfterFrame method
Implementation
void setStateAfterFrame(VoidCallback? closure) {
_widgetsBinding?.ensureVisualUpdate();
_widgetsBinding?.addPostFrameCallback(
(timeStamp) {
if (mounted) {
setState(() {
closure?.call();
});
}
},
);
}