setDisplayText method
set the text to be displayed close to the cursor during a drag and drop operation
Implementation
void setDisplayText(String value, bool isDefaultMessage) {
if (isDefaultMessage && !_showDefaultMessages) {
_displayText = "";
} else {
_displayText = value;
}
if (_messageToShowDuringDrag != null &&
_messageToShowDuringDrag!.trim() != "") {
if (_displayText != "") {
_displayText += '\n';
}
_displayText += _messageToShowDuringDrag!;
}
if (_messageToShowDuringMove != null &&
_messageToShowDuringMove!.trim() != "") {
if (_displayText != "") {
_displayText += '\n';
}
_displayText += _messageToShowDuringMove!;
}
notifyListeners();
}