copyWith method

ChatAdministrator copyWith({
  1. int? userId,
  2. String? customTitle,
  3. bool? isOwner,
})

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

Implementation

ChatAdministrator copyWith({
  int? userId,
  String? customTitle,
  bool? isOwner,
}) =>
    ChatAdministrator(
      userId: userId ?? this.userId,
      customTitle: customTitle ?? this.customTitle,
      isOwner: isOwner ?? this.isOwner,
    );