mutate method
Safely executes mutation with parameters params.
Catches errors and returns null on failure (state signals are updated with the error).
Example:
final result = await createPost.mutate({'title': 'Hello'});
Implementation
Future<T?> mutate(P params) async {
try {
return await mutateAsync(params);
} catch (_) {
return null;
}
}