MutationFn<T, P> typedef

MutationFn<T, P> = Future<T> Function(P params)

The asynchronous execution function that performs a mutation operation.

Accepts parameters of type P and resolves to a result of type T.

MutationFn<Task, CreateTaskParams> createTask = (params) => client.post('/tasks', body: params.toJson());

Implementation

typedef MutationFn<T, P> = Future<T> Function(P params);