onInit method
It's called when the memoized function is invoked for the first time with a new set of arguments. It allows you to perform any initialization logic or side effects before the calculation is performed.
Implementation
@override
void onInit(Memo<T, A> memo, A arg) {
_onInit?.call(memo, arg);
}