From 3acf347b8f373845f85a145f5f3d6a1477abf991 Mon Sep 17 00:00:00 2001 From: Valitutto Date: Tue, 15 Oct 2019 21:08:51 +0200 Subject: [PATCH] Added option for set scrollDirection (horizontal or vertical) Now we can set the scroll direction with Axis.horizontal (default value) or Axis.vertical. --- lib/flutter_calendar_carousel.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/flutter_calendar_carousel.dart b/lib/flutter_calendar_carousel.dart index 5403cef..6ac7226 100644 --- a/lib/flutter_calendar_carousel.dart +++ b/lib/flutter_calendar_carousel.dart @@ -122,6 +122,7 @@ class CalendarCarousel extends StatefulWidget { final WeekdayFormat weekDayFormat; final bool staticSixWeekFormat; final bool isScrollable; + final Axis scrollDirection; final bool showOnlyCurrentMonthDate; final bool pageSnapping; final OnDayLongPressed onDayLongPressed; @@ -194,6 +195,7 @@ class CalendarCarousel extends StatefulWidget { this.weekDayFormat = WeekdayFormat.short, this.staticSixWeekFormat = false, this.isScrollable = true, + this.scrollDirection = Axis.horizontal, this.showOnlyCurrentMonthDate = false, this.pageSnapping = false, this.onDayLongPressed, @@ -314,6 +316,7 @@ class _CalendarState extends State physics: widget.isScrollable ? ScrollPhysics() : NeverScrollableScrollPhysics(), + scrollDirection: widget.scrollDirection, onPageChanged: (index) { this._setDate(index); },