dispose abstract method

void dispose({
  1. bool clearCache = true,
})

This is the only method that is allowed to be called repeatedly, even when it does nothing.

Reason being, sometimes, you might want to both dispose the references when the Initiator widget's state is disposed and when the callback is called, but you are not sure which one should happen first. The fix is to just call the dispose method in both places (or more).

Implementation

void dispose({bool clearCache = true});