refreshTips method
void
refreshTips()
Implementation
void refreshTips() {
if (hasStartTip()) {
// get the original tip
var originalTip = startTip!;
// get a new tip
addTip(side: TIP_AT_START);
var updatedTip = startTip!;
// replace the original tip's points with those from the updated tip
originalTip.points = [for (var pt in updatedTip.points) pt.copy()];
// remove the updated tip and restore the original (but still updated) tip
remove([originalTip]);
startTip = originalTip;
// the original tip is still in submobjects
}
if (hasEndTip()) {
// get the original tip
var originalTip = endTip!;
// get a new tip
addTip(side: TIP_AT_END);
var updatedTip = endTip!;
// replace the original tip's points with those from the updated tip
originalTip.points = [for (var pt in updatedTip.points) pt.copy()];
// remove the updated tip and restore the original (but still updated) tip
remove([originalTip]);
endTip = originalTip;
// the original tip is still in submobjects
}
}