mutationSuccess method
A mutation succeeded.
result is the value returned by the mutation.
mutation is strictly the same as ProviderObserverContext.mutation.
It is provided as a convenience, as this life-cycle is guaranteed
to have a non-null ProviderObserverContext.mutation.
Implementation
@override
@mustCallSuper
void mutationSuccess(
ProviderObserverContext context,
Mutation<Object?> mutation,
Object? result,
) {
super.mutationSuccess(context, mutation, result);
if (!settings.enabled || !settings.printMutationSuccess) return;
final accepted = settings.providerFilter?.call(context.provider) ?? true;
if (!accepted) return;
_talker.logCustom(
RiverpodMutationSuccessLog(
provider: context.provider,
mutation: mutation,
result: result,
settings: settings,
),
);
}