LongPressDraggable({Key key, @required Widget child, @required Widget feedback, T data, Axis axis, Widget childWhenDragging, Offset feedbackOffset: Offset.zero, DragAnchor dragAnchor: DragAnchor.child, int maxSimultaneousDrags, VoidCallback onDragStarted, DraggableCanceledCallback onDraggableCanceled, DragEndCallback onDragEnd, VoidCallback onDragCompleted, bool hapticFeedbackOnStart: true, bool ignoringFeedbackSemantics: true }) 


Uzun basıldığında child widgetini sürüklenebilir yapar.


const LongPressDraggable({
      bool hapticFeedbackOnStart: true, //Whether haptic feedback should be triggered on drag start.
      Axis affinity,  //Controls how this widget competes with other gestures to initiate a drag. [...]
      Axis axis, //The Axis to restrict this draggable's movement, if specified. [...]
      @required Widget child, //The widget below this widget in the tree. [...]
      Widget childWhenDragging, //The widget to display instead of child when one or more drags are under way. [...]
      T data, //The data that will be dropped by this draggable.
      DragAnchor dragAnchor: DragAnchor.child,//Where this widget should be anchored during a drag.
      @required Widget feedback, //The widget to show under the pointer when a drag is under way. [...]
      Offset feedbackOffset: Offset.zero, //The feedbackOffset can be used to set the hit test target point for the purposes of finding a drag target. It is especially useful if the feedback is transformed compared to the child.
      hashCode → int //The hash code for this object. [...]
      bool ignoringFeedbackSemantics: true //Whether the semantics of the feedback widget is ignored when building the semantics tree. [...]
      Key key, //Controls how one widget replaces another widget in the tree. [...]
      int maxSimultaneousDrags,//How many simultaneous drags to support. [...]
      VoidCallback onDragCompleted,//Called when the draggable is dropped and accepted by a DragTarget. [...]
      DragEndCallback onDragEnd, //Called when the draggable is dropped. [...]
      DraggableCanceledCallback onDraggableCanceled, //Called when the draggable is dropped without being accepted by a DragTarget. [...]
      VoidCallback onDragStarted, //Called when the draggable starts being dragged.

Bir cevap yazın