Closed LeandroMoura3 closed 4 years ago
Oh, when I put the call of dialog in a Future.delayed with zero of duration, that's works!
'Future.delayed(Duration.zero, () async { waitingDialog(context); await ...myAsyncWorks });'
I think that not more sophisticated way, but my problem are solved. I think that issues can close, but if you have a better solution for it, reopen.
Thanks.
You should probably use this instead of Future.delayed
:
SchedulerBinding.instance.addPostFrameCallback((_) {
waitingDialog(context);
await ...myAsyncWorks
});
Or you can use this package: https://pub.dev/packages/after_layout
Você é brasileiro ou português? Se sim, pode falar comigo em português. Abs.
Sim, hehehe.
Agradeço pela atenção.
Abs.
I wanna show a dialog when the page is loaded. But if I call the dialog in onInit, this don't works. If I call the dialog in onDidChange, this don't are called on start of page. But in Flutter StatefulWidget, the didChangeDependencies are called after the page start, and in it I can put the dialog call.
Because that, I will need to put a StatefulWidget only for it. Have any way to do it with storeconnectors?
Thanks.