flutter_heatmap_calendar icon indicating copy to clipboard operation
flutter_heatmap_calendar copied to clipboard

Possible bug when widget updates

Open alekseifm opened this issue 4 years ago • 3 comments

Awesome package! Thanks!

I am using the HeatMapCalendar, but sometimes when it updates, values disappear and dates are shifted by one. Can someone help me or it is a known bug?

Thanks!

image image

alekseifm avatar Sep 12 '20 04:09 alekseifm

Yeah, the state doesn't load the data properly. Sometimes it's there and sometimes it doesn't.

jonnyjohnson1 avatar Nov 03 '20 05:11 jonnyjohnson1

Appears to be caused by a typo in TimeUtils...

/// Returns date without timezone info (UTC format)
  static DateTime removeTZ(DateTime dateTime) {
    return DateTime.utc(dateTime.year, dateTime.month, dateTime.day, dateTime.hour, dateTime.minute,
        dateTime.second, dateTime.millisecond, dateTime.millisecond); <<<< should be dateTime.microsecond
  }

cd104 avatar Nov 14 '20 05:11 cd104

That's it!

jonnyjohnson1 avatar Nov 14 '20 21:11 jonnyjohnson1