copyWith method Null safety

  1. @override
Channel copyWith(
  1. {String? id,
  2. String? name,
  3. String? englishName,
  4. ChannelType? type,
  5. String? org,
  6. String? suborg,
  7. String? photo,
  8. String? banner,
  9. String? twitter,
  10. String? videoCount,
  11. String? subscriberCount,
  12. String? viewCount,
  13. int? clipCount,
  14. Language? lang,
  15. String? publishedAt,
  16. bool? inactive,
  17. String? description}
)
override

Implementation

@override
Channel copyWith({
  String? id,
  String? name,
  String? englishName,
  ChannelType? type,
  String? org,
  String? suborg,
  String? photo,
  String? banner,
  String? twitter,
  String? videoCount,
  String? subscriberCount,
  String? viewCount,
  int? clipCount,
  Language? lang,
  String? publishedAt,
  bool? inactive,
  String? description,
}) {
  return Channel(
    id: id ?? this.id,
    name: name ?? this.name,
    englishName: englishName ?? this.englishName,
    type: type ?? this.type,
    org: org ?? this.org,
    suborg: suborg ?? this.suborg,
    photo: photo ?? this.photo,
    banner: banner ?? this.banner,
    twitter: twitter ?? this.twitter,
    videoCount: videoCount ?? this.videoCount,
    subscriberCount: subscriberCount ?? this.subscriberCount,
    viewCount: viewCount ?? this.viewCount,
    clipCount: clipCount ?? this.clipCount,
    lang: lang ?? this.lang,
    publishedAt: publishedAt ?? this.publishedAt,
    inactive: inactive ?? this.inactive,
    description: description ?? this.description,
  );
}