copyWith method

UpdateTaskRequestParams copyWith({
  1. String? taskId,
  2. Map<String, Map<String, Object?>>? inputResponses,
})

A copy with the given properties replaced; everything else, unknown keys included, is kept.

Implementation

UpdateTaskRequestParams copyWith({
  String? taskId,
  Map<String, Map<String, Object?>>? inputResponses,
}) =>
    UpdateTaskRequestParams.fromJson({
      ...toJson(),
      if (taskId != null) 'taskId': $encode(taskId),
      if (inputResponses != null) 'inputResponses': $encode(inputResponses),
    });