Skip to content

♻️ Remove deprecated variables and methods across the package - #552

Open
lavigarg-simform wants to merge 1 commit into
masterfrom
feat/remove-depricated-code
Open

lavigarg-simform wants to merge 1 commit into
masterfrom
feat/remove-depricated-code

Conversation

@lavigarg-simform

@lavigarg-simform lavigarg-simform commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR removes previously deprecated members from the flutter_calendar_view package that were marked for removal in the next major release. This is a breaking change that cleans up the codebase and improves the maintainability of the library.

Changes Made

1. CalendarPageHeader & Subclasses

Removed backgroundColor and iconColor parameters from:

  • CalendarPageHeader
  • DayPageHeader
  • MonthPageHeader
  • WeekPageHeader

Migration: Users should use HeaderStyle and its decoration, leftIconConfig, and rightIconConfig properties instead.

  • Removed ignore_for_file: deprecated_member_use_from_same_package directives.

2. HeaderStyle

Removed deprecated properties:

  • leftIconVisible - pass null to leftIconConfig to hide the left icon
  • rightIconVisible - pass null to rightIconConfig to hide the right icon
  • leftIconPadding - use leftIconConfig instead
  • rightIconPadding - use rightIconConfig instead
  • leftIcon - use leftIconConfig instead
  • rightIcon - use rightIconConfig instead

Simplified icon rendering logic to use only IconDataConfig properties.

3. EventController

  • Removed events getter - use allEvents instead
  • Updated internal references to use allEvents instead of the deprecated getter

4. DateTimeExtensions

  • Removed dateYMD getter - use withoutTime instead

5. Other

  • Removed MaterialColorExtension and its accent getter (unused in the package)

Breaking Changes ⚠️

✅ This is a breaking change requiring users to update their code.

All deprecated members have been completely removed from the codebase (not just marked as deprecated). Users must update their implementations to use the new APIs as shown in the migration guide above.

Checklist

  • The title of my PR starts with a Conventional Commit prefix
  • I have followed the Contributor Guide
  • All deprecated members have been removed
  • CHANGELOG.md has been updated with breaking changes
  • Migration paths are documented

Related issues

  • None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR finalizes a major-version cleanup by removing previously deprecated public APIs across the package (header parameters/properties, EventController.events, DateTimeExtensions.dateYMD, and an unused MaterialColor extension), aligning the codebase with the documented migration path and reducing ongoing maintenance surface.

Changes:

  • Removed deprecated header parameters (backgroundColor, iconColor) from CalendarPageHeader and its day/week/month subclasses, relying solely on HeaderStyle.
  • Removed deprecated HeaderStyle members and simplified header icon rendering to use IconDataConfig only (hide icons by passing null configs).
  • Removed deprecated helpers (EventController.events, DateTimeExtensions.dateYMD) and the unused MaterialColorExtension, and documented the breaking changes in CHANGELOG.md.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/src/style/header_style.dart Removes deprecated HeaderStyle fields and constructors params; keeps icon customization via IconDataConfig.
lib/src/extensions.dart Removes deprecated dateYMD and unused MaterialColorExtension.
lib/src/event_controller.dart Removes deprecated events getter and updates internal filtering to use allEvents.
lib/src/components/headers/calendar_page_header.dart Removes deprecated header color parameters and renders icons solely via HeaderStyle / IconDataConfig.
lib/src/components/headers/day_page_header.dart Drops deprecated iconColor/backgroundColor passthrough.
lib/src/components/headers/week_page_header.dart Drops deprecated iconColor/backgroundColor passthrough.
lib/src/components/headers/month_page_header.dart Drops deprecated iconColor/backgroundColor passthrough.
CHANGELOG.md Adds an unreleased entry documenting the breaking removals and migration directions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This branch has not been deployed

No deployments
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.

3 participants