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

DateTime Property - No Change #13

Closed
JayDev43 opened this issue Nov 4, 2020 · 1 comment
Closed

DateTime Property - No Change #13

JayDev43 opened this issue Nov 4, 2020 · 1 comment

Comments

@JayDev43
Copy link

JayDev43 commented Nov 4, 2020

When changing the DateTime that is passed into the AnalogClock Widget based on some event the clock isn't updating on the device. Having taken a look at the code, I believe this is because you haven't overridden the didUpdateWidget method in the _AnalogClockState class.

I believe you need a method like

@override
  void didUpdateWidget(AnalogClock oldWidget) {
    super.didUpdateWidget(oldWidget);
    
    if(!widget.isLive && widget.datetime != oldWidget.datetime) {
      datetime = widget.datetime;
    }
  }
@furkantektas
Copy link
Owner

Hi @JayDev43 ,
I could only add this on 0.1.1, thank you very much for the very helpful feedback 😊

furkantektas added a commit that referenced this issue Jan 1, 2022
Fix clock repaints (thanks to @JayDev43) Fixes #13
Bump version to 0.1.1
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