onInit method

  1. @override
void onInit(
  1. Memo<T, A> memo,
  2. A arg
)
override

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) {
  for (final interceptor in interceptors) {
    interceptor.onInit(memo, arg);
  }
}