TimeLinePicker constructor

TimeLinePicker({
  1. Key? key,
  2. required DateTime startDate,
  3. required int endDay,
  4. required int selectedDay,
  5. required ValueChanged<DateTime> onChanged,
  6. required Widget dayBuilder(
    1. DateTime day,
    2. bool isSelected,
    3. double width,
    4. double height,
    ),
  7. required Widget monthBuilder(
    1. DateTime month
    ),
  8. int itemCount = 3,
  9. double itemHeight = 150,
  10. double itemWidth = 100,
  11. Axis axis = Axis.vertical,
  12. bool haptics = false,
  13. TextMapper? textMapper,
  14. bool infiniteLoop = false,
  15. Duration selectedTimeDelay = const Duration(seconds: 8),
})

Implementation

TimeLinePicker({
  super.key,
  required this.startDate,
  required this.endDay,
  required this.selectedDay,
  required this.onChanged,
  required this.dayBuilder,
  required this.monthBuilder,
  this.itemCount = 3,
  this.itemHeight = 150,
  this.itemWidth = 100,
  this.axis = Axis.vertical,
  this.haptics = false,
  this.textMapper,
  this.infiniteLoop = false,
  this.selectedTimeDelay = const Duration(seconds: 8),
})  : assert(endDay > 0),
      assert(endDay >= selectedDay) {
  value = selectedDay;
}