vibrar na construção completa
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) => yourFunction(context));
}
Raising Star
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) => yourFunction(context));
}
QUESTIONS: Flutter: Run method on Widget build complete
ANSWERS:
1) WidgetsBinding.instance.addPostFrameCallback((_) => yourFunc(context)); //Recomended
2) Future.delayed(Duration.zero, () => yourFunc(context));
3) Timer.run(() => yourFunc(context));