rwbr / flutter_neat_and_clean_calendar

Simple and clean flutter calendar with ability to slide up/down to show weekly/monthly calendar. Forked from [flutter_clean_calender](https://pub.dev/packages/flutter_clean_calendar)
MIT License
104 stars 51 forks source link

Event Dot Colours Not Displaying Correctly #68

Open fbelluco opened 8 months ago

fbelluco commented 8 months ago

Environment

Description

After updating from version 0.2.3+11 to 0.3.15+35, I've encountered an issue with the event dot colours not displaying correctly.

Previously, I had set up the following attributes: eventColor: Colors.green eventDoneColor: Colors.red

With this configuration, the events marked as done (isDone = true) used to display a red dot, while the available events (isDone = false) displayed a green dot. However, after the update, all event dots are showing in green regardless of their isDone status.

Expected Behavior

Events with isDone = true should display a red dot, and those with isDone = false should display a green dot.

Actual Behavior

All event dots are displayed in green, ignoring the isDone attribute.

Code Snippet

// Example of the configuration used
Calendar(
  // ...
  eventColor: Colors.green,
  eventDoneColor: Colors.red,
  // ...
)

Workaround

As a temporary workaround, I have been dynamically setting the colour attribute in the NeatCleanCalendarEvent based on the isDone value while building the list of events. Here's a snippet demonstrating this:

NeatCleanCalendarEvent(
  /// ...
  isDone: isDone,
  color: isDone ? Colors.red : Colors.green,
  /// ...
);