addCallback method
- ValueGetter<
Future< callbackbool> >
Register the callback to be called when the object changes.
If other callbacks have already been registered, they must be removed (with removeCallback) before the callback is next called.
Implementation
@override
void addCallback(ValueGetter<Future<bool>> callback) {
if (!hasCallbacks) {
WidgetsBinding.instance.addObserver(this);
}
super.addCallback(callback);
}