Skip to content
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

onTimeChange() getting called without any user interaction #15

Open
willhaslett opened this issue Jan 7, 2021 · 1 comment
Open

onTimeChange() getting called without any user interaction #15

willhaslett opened this issue Jan 7, 2021 · 1 comment

Comments

@willhaslett
Copy link

The widget renders fine, but onTimeChange() is getting called upon the initial widget build, without the user having touched the screen. Can I prevent this?

@Mohsin0344
Copy link

Just comment out this piece of code in the iniState() inside the package file

 if (widget.onTimeChange != null) {
      WidgetsBinding.instance!
          .addPostFrameCallback((_) => widget.onTimeChange!(getDateTime()));
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants