call abstract method
Allow to consider this instance as Function, so it can be used like this :
final StatefulValuable<String> tracer = StatefulValuable<String>("init");
final ValuableCallback printTrace = ValuableCallback(_printTrace);
void _printTrace(ValuableWatcher watch, {ValuableContext valuableContext}) {
print(watch(tracer));
}
printTrace(); /// OUPUT : init
tracer.setValue("newValue"); /// Automatically OUTPUT : newValue
Implementation
void call({ValuableContext? valuableContext});