Effectuer l'action lorsque la construction est terminée
WidgetsBinding.instance.addPostFrameCallback((_) {
// executes after build
})
justwonderful
WidgetsBinding.instance.addPostFrameCallback((_) {
// executes after build
})
@override
Widget build(BuildContext context) {
WidgetsBinding.instance.addPostFrameCallback((_) => afterBuild);
return Container(); // widget tree
}
void afterBuild() {
// executes after build is done
}