You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ Replace CalendarThemeProvider with ThemeData.extensions and unify color palette
Removes CalendarThemeProvider and CalendarThemeData in favor of standard
ThemeData.extensions, unifies all color tokens into a single CalendarViewColors
palette (with matched light/dark sub-palettes), and makes all five BuildContext
theme accessors brightness-aware. Adds ScheduleView theming, updates the example
app to drive all calendar and chrome colors from a single AppColors source of
truth, and introduces runtime theme-mode switching via ThemeController.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
# [Unreleased - 29 May 2026]
2
2
3
-
-[BREAKING] Added `BuildContextExtension` to public API for theme access.
3
+
-[BREAKING] Removed `CalendarThemeProvider` and `CalendarThemeData`. Themes are resolved exclusively from `ThemeData.extensions`.
4
+
-[BREAKING] Added `BuildContextExtension` to public API for theme access; themes now fallback to system theme (brightness-aware) when no extension is registered.
5
+
-[BREAKING] Removed `BuildContextMultiDayViewThemeExtension.multiDayViewTheme` in favor of `BuildContextExtension.multiDayViewColors`.
6
+
-[BREAKING]`highlightColor` was renamed to `cellHighlightColor` in `MonthViewThemeData.copyWith` method for API consistency.
4
7
- Added `ScheduleView`, a scrollable, agenda-style calendar that groups events by day and month. [#101](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/101)
5
8
- Added localized `months` and `monthsAbbr` fields to `CalendarLocalizations`, with the `DateTime.getMonthName({abbreviated})` and `DateTime.getMonthYear({abbreviatedMonth})` extensions.
6
9
-[BREAKING] Changed `RecurrenceSettings.weekdays` type from `List<int>` to `List<WeekDays>`. [#509](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/509)
final myMonthViewTheme = MonthViewThemeData.light().copyWith(
1034
+
cellInMonthColor: Colors.blue.shade50,
1035
+
cellBorderColor: Colors.blue.shade300,
1036
+
);
1044
1037
1045
-
2.**Using ThemeData extensions** (since all theme data classes extend `ThemeExtension`):
1046
-
```dart
1047
-
// Create custom theme
1048
-
final myMonthViewTheme = MonthViewThemeData.light().copyWith(
1049
-
cellInMonthColor: Colors.blue.shade50,
1050
-
cellBorderColor: Colors.blue.shade300,
1051
-
);
1038
+
// Apply to your app theme — register extensions on BOTH theme and darkTheme
1039
+
// so customizations apply in all brightness modes.
1040
+
final lightTheme = ThemeData.light().copyWith(
1041
+
extensions: [
1042
+
myMonthViewTheme,
1043
+
DayViewThemeData.light(),
1044
+
WeekViewThemeData.light(),
1045
+
MultiDayViewThemeData.light(),
1046
+
ScheduleViewThemeData.light(),
1047
+
],
1048
+
);
1052
1049
1053
-
// Apply to your app theme
1054
-
final theme = ThemeData.light().copyWith(
1055
-
extensions: [
1056
-
myMonthViewTheme,
1057
-
DayViewThemeData.light(),
1058
-
WeekViewThemeData.light(),
1059
-
MultiDayViewThemeData.light(),
1060
-
ScheduleViewThemeData.light(),
1061
-
],
1062
-
);
1063
-
```
1050
+
final darkTheme = ThemeData.dark().copyWith(
1051
+
extensions: [
1052
+
MonthViewThemeData.dark(),
1053
+
DayViewThemeData.dark(),
1054
+
WeekViewThemeData.dark(),
1055
+
MultiDayViewThemeData.dark(),
1056
+
ScheduleViewThemeData.dark(),
1057
+
],
1058
+
);
1059
+
1060
+
MaterialApp(
1061
+
theme: lightTheme,
1062
+
darkTheme: darkTheme,
1063
+
// ...
1064
+
);
1065
+
```
1064
1066
1065
1067
### Day view
1066
1068
* Default timeline text color is `timelineTextColor` in `DayViewThemeData` (defaults to `onSurface`).
@@ -1209,19 +1211,19 @@ Hide divider in multiday view.
1209
1211
* In `ScheduleDateLayout.top`, the divider beneath the default date header uses `dateDividerColor`; override it per-widget with `defaultDateHeaderDividerSettings` (use `DividerSettings.none()` to hide it).
@@ -1382,6 +1384,56 @@ final end = organized.endDuration; // TimeOfDay
1382
1384
| `DateTime.dateYMD` (Deprecated) | Use `DateTime.withoutTime` getter |
1383
1385
| `MaterialColorExtension.accent` (Deprecated) | No replacement |
1384
1386
1387
+
### 10. Removed `CalendarThemeProvider` and `CalendarThemeData`
1388
+
1389
+
`CalendarThemeProvider`and its `CalendarThemeData` payload have been removed. The calendar views never read from them — themes resolve exclusively from `ThemeData.extensions` (via `context.dayViewColors`, `context.scheduleViewColors`, etc.). Register each view's `…ViewThemeData` in `ThemeData.extensions` instead.
The standalone `context.multiDayViewTheme` accessor (from the `BuildContextMultiDayViewThemeExtension` extension) has been removed. Use `context.multiDayViewColors` from `BuildContextExtension` instead — it returns the same `MultiDayViewThemeData`, resolving from `ThemeData.extensions` and falling back to `.light()` / `.dark()` based on the ambient `Theme` brightness.
0 commit comments