From 407f187dbbd70b64c88ffe431877a59f49160f06 Mon Sep 17 00:00:00 2001 From: Apurva-Simform <122270609+apurva010@users.noreply.github.com> Date: Wed, 8 May 2024 19:04:06 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20show=20border=20not?= =?UTF-8?q?=20applying=20to=20header=20in=20month=20view=20#306=20(#364)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + README.md | 3 ++- lib/src/month_view/month_view.dart | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d5531f5..7a5ccbda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index 62659155..206f5c09 100644 --- a/README.md +++ b/README.md @@ -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 ); ``` diff --git a/lib/src/month_view/month_view.dart b/lib/src/month_view/month_view.dart index 4c62e989..3f974e71 100644 --- a/lib/src/month_view/month_view.dart +++ b/lib/src/month_view/month_view.dart @@ -90,6 +90,12 @@ class MonthView 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] @@ -194,6 +200,7 @@ class MonthView 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); @@ -521,6 +528,7 @@ class MonthViewState extends State> { return WeekDayTile( dayIndex: index, weekDayStringBuilder: widget.weekDayStringBuilder, + displayBorder: widget.showWeekTileBorder, ); }