copyWith method

  1. @override
UpdateStoryPostFailed copyWith({
  1. Story? story,
  2. TdError? error,
  3. CanPostStoryResult? errorType()?,
  4. dynamic extra,
  5. int? clientId,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
UpdateStoryPostFailed copyWith({
  Story? story,
  TdError? error,
  CanPostStoryResult? Function()? errorType,
  dynamic extra,
  int? clientId,
}) => UpdateStoryPostFailed(
  story: story ?? this.story,
  error: error ?? this.error,
  errorType: errorType != null ? errorType() : this.errorType,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);