copyWith method

BusinessConnection copyWith({
  1. String? id,
  2. int? userId,
  3. int? userChatId,
  4. int? date,
  5. BusinessBotRights? rights()?,
  6. bool? isEnabled,
  7. dynamic extra,
  8. int? clientId,
})

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

Implementation

BusinessConnection copyWith({
  String? id,
  int? userId,
  int? userChatId,
  int? date,
  BusinessBotRights? Function()? rights,
  bool? isEnabled,
  dynamic extra,
  int? clientId,
}) => BusinessConnection(
  id: id ?? this.id,
  userId: userId ?? this.userId,
  userChatId: userChatId ?? this.userChatId,
  date: date ?? this.date,
  rights: rights != null ? rights() : this.rights,
  isEnabled: isEnabled ?? this.isEnabled,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);