FlutterDatePickerTimeline constructor
FlutterDatePickerTimeline({
- Key? key,
- CalendarMode calendarMode = CalendarMode.gregorian,
- required DateTime startDate,
- required DateTime endDate,
- DateTime? initialSelectedDate,
- DateTime? initialFocusedDate,
- TextDirection? textDirection,
- double selectedItemWidth = 170,
- double unselectedItemWidth = 38,
- double itemHeight = 38,
- double itemRadius = 10,
- EdgeInsets listViewPadding = const EdgeInsets.only(right: 5.5, left: 5.5),
- EdgeInsets selectedItemMargin = const EdgeInsets.only(right: 5.5, left: 5.5),
- EdgeInsets unselectedItemMargin = const EdgeInsets.only(right: 5.5, left: 5.5),
- Color selectedItemBackgroundColor = const Color(0xFF2B2C30),
- Color unselectedItemBackgroundColor = Colors.white,
- TextStyle? selectedItemTextStyle,
- TextStyle? unselectedItemTextStyle,
- required DateChangeListener onSelectedDateChange,
Implementation
FlutterDatePickerTimeline({
Key? key,
this.calendarMode = CalendarMode.gregorian,
required this.startDate,
required this.endDate,
this.initialSelectedDate,
this.initialFocusedDate,
this.textDirection,
this.selectedItemWidth = 170,
this.unselectedItemWidth = 38,
this.itemHeight = 38,
this.itemRadius = 10,
this.listViewPadding = const EdgeInsets.only(right: 5.5, left: 5.5),
this.selectedItemMargin = const EdgeInsets.only(right: 5.5, left: 5.5),
this.unselectedItemMargin = const EdgeInsets.only(right: 5.5, left: 5.5),
this.selectedItemBackgroundColor = const Color(0xFF2B2C30),
this.unselectedItemBackgroundColor = Colors.white,
this.selectedItemTextStyle,
this.unselectedItemTextStyle,
required this.onSelectedDateChange,
}) : assert((endDate.isSameDate(startDate) || endDate.isAfter(startDate)),
"The end date must be same or before the start date!"),
assert(
initialSelectedDate == null ||
initialSelectedDate.isInRange(startDate, endDate),
"The initialSelectedDate must be in the start and end date range!"),
assert(
initialFocusedDate == null ||
initialFocusedDate.isInRange(startDate, endDate),
"The initialFocusedDate must be in the start and end date range!"),
super(key: key);