Skip to content

Commit

Permalink
Added option for set scrollDirection (horizontal or vertical) (#166)
Browse files Browse the repository at this point in the history
Now we can set the scroll direction with Axis.horizontal (default value) or Axis.vertical.
  • Loading branch information
Valitutto authored and hyochan committed Oct 17, 2019
1 parent 7e2f5bd commit 5bdf457
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/flutter_calendar_carousel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class CalendarCarousel<T extends EventInterface> extends StatefulWidget {
final WeekdayFormat weekDayFormat;
final bool staticSixWeekFormat;
final bool isScrollable;
final Axis scrollDirection;
final bool showOnlyCurrentMonthDate;
final bool pageSnapping;
final OnDayLongPressed onDayLongPressed;
Expand Down Expand Up @@ -194,6 +195,7 @@ class CalendarCarousel<T extends EventInterface> extends StatefulWidget {
this.weekDayFormat = WeekdayFormat.short,
this.staticSixWeekFormat = false,
this.isScrollable = true,
this.scrollDirection = Axis.horizontal,
this.showOnlyCurrentMonthDate = false,
this.pageSnapping = false,
this.onDayLongPressed,
Expand Down Expand Up @@ -314,6 +316,7 @@ class _CalendarState<T extends EventInterface> extends State<CalendarCarousel<T>
physics: widget.isScrollable
? ScrollPhysics()
: NeverScrollableScrollPhysics(),
scrollDirection: widget.scrollDirection,
onPageChanged: (index) {
this._setDate(index);
},
Expand Down

0 comments on commit 5bdf457

Please sign in to comment.