copyWith method

InputRequiredResult copyWith({
  1. ResultMetaObject? meta,
  2. Map<String, InputRequest>? inputRequests,
  3. String? requestState,
  4. String? resultType,
})

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

Implementation

InputRequiredResult copyWith({
  ResultMetaObject? meta,
  Map<String, InputRequest>? inputRequests,
  String? requestState,
  String? resultType,
}) =>
    InputRequiredResult.fromJson({
      ...toJson(),
      if (meta != null) '_meta': $encode(meta),
      if (inputRequests != null) 'inputRequests': $encode(inputRequests),
      if (requestState != null) 'requestState': $encode(requestState),
      if (resultType != null) 'resultType': $encode(resultType),
    });