Skip to content

Commit

Permalink
fix: 🐛 fix show border not applying to header in month view #306 (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
apurva010 authored May 8, 2024
1 parent cfd0612 commit 407f187
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- # [1.1.1] (UnReleased)
- Added showWeekTileBorder field whether to show border for header in month view. [#306](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/306)
- Added support for double tapping gestures on any event in day, week, and month view. [#195](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/195)
- Added support to set end time of day and week view. [#298](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/298)
- Added support for horizontal scroll physics of week and month view page. [#314](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/314)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ MonthView(
onEventDoubleTap: (events, date) => print(events),
onEventLongTap: (event, date) => print(event),
onDateLongPress: (date) => print(date),
headerBuilder: MonthHeader.hidden // To hide month header
headerBuilder: MonthHeader.hidden, // To hide month header
showWeekTileBorder: false, // To show or hide header border
);
```

Expand Down
8 changes: 8 additions & 0 deletions lib/src/month_view/month_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ class MonthView<T extends Object?> extends StatefulWidget {
/// [borderColor] to define color of the border.
final bool showBorder;

/// Defines whether to show default borders or not for weekTile.
///
/// Default value is true
///
final bool showWeekTileBorder;

/// Defines width of default border
///
/// Default value is [Colors.blue]
Expand Down Expand Up @@ -194,6 +200,7 @@ class MonthView<T extends Object?> extends StatefulWidget {
this.pagePhysics = const ClampingScrollPhysics(),
this.pageViewPhysics,
this.onEventDoubleTap,
this.showWeekTileBorder = true,
}) : assert(!(onHeaderTitleTap != null && headerBuilder != null),
"can't use [onHeaderTitleTap] & [headerBuilder] simultaneously"),
super(key: key);
Expand Down Expand Up @@ -521,6 +528,7 @@ class MonthViewState<T extends Object?> extends State<MonthView<T>> {
return WeekDayTile(
dayIndex: index,
weekDayStringBuilder: widget.weekDayStringBuilder,
displayBorder: widget.showWeekTileBorder,
);
}

Expand Down

0 comments on commit 407f187

Please sign in to comment.