TimelineItem constructor

TimelineItem({
  1. Key? key,
  2. required DateTime startDateTime,
  3. required DateTime endDateTime,
  4. int position = 0,
  5. void onStartDateTimeChanged(
    1. DateTime
    )?,
  6. void onEndDateTimeChanged(
    1. DateTime
    )?,
  7. void onStartDateTimeUpdated(
    1. DateTime
    )?,
  8. void onEndDateTimeUpdated(
    1. DateTime
    )?,
  9. required Widget child,
})

A widget that positions a child in a DynamicTimeline and can be resized with drag gestures on the start and end sides.

Implementation

TimelineItem({
  Key? key,
  required this.startDateTime,
  required this.endDateTime,
  this.position = 0,
  this.onStartDateTimeChanged,
  this.onEndDateTimeChanged,
  this.onStartDateTimeUpdated,
  this.onEndDateTimeUpdated,
  required Widget child,
})  : assert(
        startDateTime.isBefore(endDateTime),
        'startDateTime must be before endDateTime: '
        'starDateTime: $startDateTime --- endDateTime: $endDateTime',
      ),
      super(key: key, child: child);