Skip to content

fixed calendar color bug#503

Merged
RamSuthar-Digia merged 2 commits intomainfrom
shashwat/calendarBug
Feb 12, 2026
Merged

fixed calendar color bug#503
RamSuthar-Digia merged 2 commits intomainfrom
shashwat/calendarBug

Conversation

@ShashwatXD
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Walkthrough

Reworked header construction and color resolution in the calendar widget: introduced BoxDecoration-based header, explicit default chevron icons, standardized padding fallbacks, and replaced payload.getColor with payload.evalColor across header, days-of-week, and calendar styling (including table border).

Changes

Cohort / File(s) Summary
Calendar Widget
lib/src/framework/widgets/calendar.dart
Replaced early return with computed decoration (BoxDecoration) and wired into HeaderStyle. Added explicit default left/right chevron icons and standardized headerPadding / chevron padding fallbacks. Switched color resolution from payload.getColor to payload.evalColor for header, days-of-week, calendar style (rangeHighlightColor), and in _toTableBorder with safe fallbacks.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a description explaining what calendar color bug was fixed, what the root cause was, and how the changes resolve it.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fixed calendar color bug' directly relates to the changeset, which fixes color evaluation in calendar widget styling by switching from payload.getColor to payload.evalColor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch shashwat/calendarBug

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@lib/src/framework/widgets/calendar.dart`:
- Around line 170-192: The code currently assigns decoration = const
BoxDecoration() when shapeProps is null which discards any provided shape value;
update the branch where shapeProps == null to construct a BoxDecoration that
preserves the existing shape variable (and sets borderRadius null when shape ==
BoxShape.circle) so the 'shape' passed into the widget is retained; modify the
logic around decoration, shapeProps, and headerBorderRadius in the constructor
(references: decoration, shapeProps, shape, BoxDecoration, headerBorderRadius)
so the default path mirrors the non-null path's shape handling without
introducing runtime changes.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@lib/src/framework/widgets/calendar.dart`:
- Around line 139-141: The file fails Dart formatting; run the Dart formatter
and reformat this file so the CI check passes — specifically ensure the line
defining headerPadding (the call to
To.edgeInsets(headerStyle.get('headerPadding'), or: const
EdgeInsets.symmetric(vertical: 8.0))) is formatted according to dart format
style; run `dart format` (or your IDE formatter) on
lib/src/framework/widgets/calendar.dart and commit the updated formatting.

Comment on lines +139 to +141
EdgeInsets headerPadding = To.edgeInsets(headerStyle.get('headerPadding'),
or: const EdgeInsets.symmetric(vertical: 8.0));

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Run dart format to fix the failing CI check.

The pipeline reports a Dart format failure; please run the formatter (e.g., on this file) so the check passes.

🤖 Prompt for AI Agents
In `@lib/src/framework/widgets/calendar.dart` around lines 139 - 141, The file
fails Dart formatting; run the Dart formatter and reformat this file so the CI
check passes — specifically ensure the line defining headerPadding (the call to
To.edgeInsets(headerStyle.get('headerPadding'), or: const
EdgeInsets.symmetric(vertical: 8.0))) is formatted according to dart format
style; run `dart format` (or your IDE formatter) on
lib/src/framework/widgets/calendar.dart and commit the updated formatting.

@RamSuthar-Digia RamSuthar-Digia merged commit 632c99c into main Feb 12, 2026
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants