-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loader not showing when im doing setState #40
Comments
Hello @mambaur , thanks for using this package. It's not very clear for me what's you problem. Can you provide a minimal sample that reproduces your issue? |
I'm facing the same issue. The problem is that when you show the loader, do something on background and call setState(), the loader automatically hides even if you need to do more things previous to hide it |
is your problem solved or can you post a code sample? |
Hi @hugomc92 & @mambaur, I don't know if they still have this issue, but I assure you that in the latest version of the package (3.0.0 currently) this issue is not reproduced. Even in the example it can be verified. example code (reproducing the problem I understand you have): ElevatedButton(
onPressed: () async {
context.loaderOverlay.show();
setState(() {
_isLoaderVisible = context.loaderOverlay.visible;
});
await Future.delayed(Duration(seconds: 2));
if (_isLoaderVisible) {
context.loaderOverlay.hide();
}
setState(() {
_isLoaderVisible = context.loaderOverlay.visible;
});
},
child: Text('Show overlay for 2 seconds'),
), Results in docs (super cool gif).... but basically the Overlay is shown with If you try the latest version and still have the issue, please share the example code so I can reproduce it. 🎄 |
No description provided.
The text was updated successfully, but these errors were encountered: