Skip to content

Commit 077d35f

Browse files
authored
Merge pull request #437 from SimformSolutionsPvtLtd/fix/issue_432_icon_config
fix: Fixes issue #432: 🐛 Fixes right icon always shows default icon
2 parents 095ede2 + 15be037 commit 077d35f

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Adds `showWeekends` flag in month view to hide & show weekends view.
33
Default is `showWeekends = true` shows all weekdays. [#385](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/385)
44
- Events are now hidden for days not in the current month when hideDaysNotInMonth = true
5+
- Fixes right icon always shows default icon in `CalendarPageHeader` when providing custom icon. [#432](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/432)
56

67
# [1.3.0 - 12 Nov 2024](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/tree/1.3.0)
78

lib/src/components/headers/calendar_page_header.dart

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,21 @@ class CalendarPageHeader extends StatelessWidget {
143143
),
144144
if (headerStyle.rightIconVisible &&
145145
headerStyle.rightIconConfig != null)
146-
IconButton(
147-
onPressed: onNextDay,
148-
splashColor: Colors.transparent,
149-
focusColor: Colors.transparent,
150-
hoverColor: Colors.transparent,
151-
highlightColor: Colors.transparent,
152-
padding: headerStyle.rightIconPadding,
153-
icon: headerStyle.rightIcon ??
154-
Icon(
155-
Icons.chevron_right,
156-
size: headerStyle.rightIconConfig?.size,
157-
color: iconColor ?? headerStyle.rightIconConfig?.color,
158-
),
159-
),
146+
headerStyle.rightIconConfig!.icon?.call(context) ??
147+
IconButton(
148+
onPressed: onNextDay,
149+
splashColor: Colors.transparent,
150+
focusColor: Colors.transparent,
151+
hoverColor: Colors.transparent,
152+
highlightColor: Colors.transparent,
153+
padding: headerStyle.rightIconPadding,
154+
icon: headerStyle.rightIcon ??
155+
Icon(
156+
Icons.chevron_right,
157+
size: headerStyle.rightIconConfig?.size,
158+
color: iconColor ?? headerStyle.rightIconConfig?.color,
159+
),
160+
),
160161
],
161162
),
162163
);

0 commit comments

Comments
 (0)