mutate method

Future<T?> mutate(
  1. P params
)

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;
  }
}