furkantektas/analog_clock

DateTime Property - No Change

JayDev43 opened this issue · 1 comments

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;
    }
  }

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