ScrollableDatePicker class

Widget which displays selected dates.

Inheritance

Constructors

ScrollableDatePicker({Key? key, DateTime? initialDate, required DateTime minDate, required DateTime maxDate, bool showWeekdays = true, bool repeatWeekdayNames = true, bool showHeaderTitle = true, TextStyle? weekdaysNameTextStyle, TextStyle? weekendDaysNameTextStyle, TextStyle? weekendDaysTextStyle, TextStyle currentDateTextStyle = const TextStyle(color: Colors.redAccent), TextStyle? dayNumberTextStyle, TextStyle? headerTextStyle, TextStyle futureDatesTextStyle = const TextStyle(color: Colors.grey), bool showDatesOnlyBetweenMinAndMax = false, String? localeName, DateSelectionType dateSelectionType = DateSelectionType.singleDate, DateTime? selectedSingleDate, List<DateTime>? selectedDates, DateRangeModel? dateRange, dynamic onDateSelect(DateTime?, List<DateTime>?, DateRangeModel?)?, ScrollController? scrollController, ScrollPhysics? scrollPhysics, double? itemExtent, DateFormat? headerDateFormat, bool futureDatesAreAvailable = false, SingleSelectionDecoration singleSelectionDecoration = const SingleSelectionDecoration(shape: BoxShape.circle, color: Color(0xFF3FB8AF), height: 20), RangeSelectionDecoration rangeSelectionDecoration = const RangeSelectionDecoration(color: Color.fromARGB(200, 63, 184, 175), borderRadius: BorderRadius.all(Radius.circular(12)), height: 30, startDateSelectionDecoration: SingleSelectionDecoration(shape: BoxShape.circle, color: Color(0xFF3FB8AF), height: 20), endDateSelectionDecoration: SingleSelectionDecoration(shape: BoxShape.circle, color: Color(0xFF3FB8AF), height: 20)), double daysRowHeight = 45.0, BoxDecoration? headerDecoration, HeaderBuilder? headerBuilder, EdgeInsets headerPadding = const EdgeInsets.symmetric(vertical: 20), EdgeInsets datePickerPadding = const EdgeInsets.only(), EdgeInsets monthViewPadding = const EdgeInsets.only(), double? monthViewHeight, double? monthViewWidth, Color headerColor = const Color(0xFF3FB8AF), bool scrollToInitialDate = true})

Properties

currentDateTextStyle TextStyle
Current day DateTime.now().day text style.
final
datePickerPadding EdgeInsets
ListView padding.
final
dateRange DateRangeModel?
Date range from startDate to endDate with DateSelectionType.dateRange selection type.
final
dateSelectionType DateSelectionType
Type of date selection DateSelectionType.singleDate, DateSelectionType.multipleDates, DateSelectionType.dateRange.
final
dayNumberTextStyle TextStyle?
Month day text style.
final
daysRowHeight double
Days row height. Used to controll height of each week row in month view.
final
futureDatesAreAvailable bool
Flag to controll interaction with dates after DateTime.now().
final
futureDatesTextStyle TextStyle
Future days (days after DateTime.now()) text style.
final
hashCode int
The hash code for this object.
no setterinherited
headerBuilder → HeaderBuilder?
typedef function used for title customization.
final
headerColor Color
Header selection color.
final
headerDateFormat DateFormat?
Value to format date inside month title.
final
headerDecoration BoxDecoration?
Visual decoration for month title.
final
headerPadding EdgeInsets
Title padding.
final
headerTextStyle TextStyle?
Month name text style.
final
initialDate DateTime?
The date that is displayed first on the screen.
final
itemExtent double?
If non-null, forces the children to have the given extent in the scroll direction.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
localeName String?
Month and weekday localization.
final
maxDate DateTime
Maximum available date.
final
minDate DateTime
Minimum available date.
final
monthViewHeight double?
Month view height.
final
monthViewPadding EdgeInsets
Month view padding.
final
monthViewWidth double?
Month view width.
final
onDateSelect → dynamic Function(DateTime?, List<DateTime>?, DateRangeModel?)?
Date selection callback.
final
rangeSelectionDecoration RangeSelectionDecoration
DateSelectionType.dateRange decoration configuration.
final
repeatWeekdayNames bool
Flag to controll weekday names repeat.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
Scroll controller.
final
scrollPhysics ScrollPhysics?
Scroll direction. Platform specific physics by default.
final
scrollToInitialDate bool
Flag to controll scrolling to initial date time.
final
selectedDates List<DateTime>?
Dates selected with DateSelectionType.multipleDates selection type.
final
selectedSingleDate DateTime?
Date selected with DateSelectionType.singleDate selection type.
final
showDatesOnlyBetweenMinAndMax bool
Flag to controll which dates should be displayed. If value is true, displayes dates only between minDate and maxDate, else displays dates starts from DateTime(minDate.year, 1, 1) to DateTime(maxDate.year, 12, 1).
final
showHeaderTitle bool
Flag to controll month title display.
final
showWeekdays bool
Flag to controll weekday names dislpay.
final
singleSelectionDecoration SingleSelectionDecoration
DateSelectionType.singleDate and DateSelectionType.multipleDates decoration configuration.
final
weekdaysNameTextStyle TextStyle?
Weekday name text style.
final
weekendDaysNameTextStyle TextStyle?
Weekend day name text style.
final
weekendDaysTextStyle TextStyle?
Weekend day numbers text style.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ScrollableDatePicker>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited