CaiJingLong / flutter_load_widget

Apache License 2.0
35 stars 13 forks source link

Not showing while hiding soft keyboard #14

Closed meeftah closed 11 months ago

meeftah commented 4 years ago

I want to hide soft keyboard when login button clicked with // FocusScope.of(context).requestFocus();

showLoadingDialog() follow after that, but it didn't show....unless I clicked the login button again (after soft keyboard is hidden)

any thoughts?

bardez commented 3 years ago

Same problem here!

ephraimilunga commented 2 years ago

For anyone having this issue, I've managed to implement a hack as follow:

FocusScope.of(context).unfocus(); // hide the keyboard

await Future.delayed(Duration(milliseconds: 550)); // wait for few milliseconds

await showLoadingDialog(tapDismiss: false); // then show the loader

// re-show the keyboard for any reason. eg. if an error occurs.
FocusScope.of(context).requestFocus(); 

@meeftah @bardez FYI