timetable icon indicating copy to clipboard operation
timetable copied to clipboard

Add global drag&drop manager to track event movement

Open TatsuUkraine opened this issue 7 months ago • 0 comments

Package has a widget called part day draggable event that allows to get notifications when user is trying to drag&drop event within the timetable. The problem is that if this event (widget) destroyed it throws exceptions since part day draggable widget heavily replies on render object that it wraps. This may happen due to new updated data set or when date, where this event was rendered, destroyed by the flutter

Proposal

  1. Add new widget that can be used as a manager to receive drag&drop events
  2. This widget shouldn't rely on original event widget to avoid any exceptions due to missing reference
  3. Potentially it can be inherited widget that wraps timetable content or entire timtable widget
  4. Allow to get access to necessary methods (such as startDragAndDrop or similar) to start drag&drop process from the event widget
  5. This widget can also allow to get access dragged event so dev could have ability manually highlight event as dragged
  6. Allow to provide onDragStarted, onDragCancelled, onDragMoved, onDragCompleted callbacks to this widget
  7. Potentially each of these events may contain TimeTableEvent (original) instance and DateTime (for some of the callbacks) where this event is currently on
  8. Ideally this widget also should be able to cancel drag&drop action whenever tap is lost (router navigations, alert dialogs etc)

Maybe to handle 4 and 5 this package can provide something similar to part day draggable widget where stuff described in these items will be done internally

TatsuUkraine avatar Nov 27 '23 20:11 TatsuUkraine