copyWith method

CancelledNotificationParams copyWith({
  1. NotificationMetaObject? meta,
  2. String? reason,
  3. Object? requestId,
})

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

Implementation

CancelledNotificationParams copyWith({
  NotificationMetaObject? meta,
  String? reason,
  Object? requestId,
}) =>
    CancelledNotificationParams.fromJson({
      ...toJson(),
      if (meta != null) '_meta': $encode(meta),
      if (reason != null) 'reason': $encode(reason),
      if (requestId != null) 'requestId': $encode(requestId),
    });