I have a draggable widget in flutter... it has many things such as:

            onDraggableCanceled: (e, q) {
             // do something
            },
            onDragCompleted: () {
              // do something
            },
            onDragEnd: (l) {
              // do something
            },

But, I want to check if the object should be allowed to be draggable before it drags. Basically, is there a thing called,

allowedToDrag () {
// check if allowed based on parameter, and if it is then drag, if not, dont
}

Is there something like this I can do for my draggable? Thanks!