copyWith method

  1. @override
PageBlockChatLink copyWith({
  1. String? title,
  2. ChatPhotoInfo? photo()?,
  3. int? accentColorId,
  4. String? username,
})
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
PageBlockChatLink copyWith({
  String? title,
  ChatPhotoInfo? Function()? photo,
  int? accentColorId,
  String? username,
}) =>
    PageBlockChatLink(
      title: title ?? this.title,
      photo: photo != null ? photo() : this.photo,
      accentColorId: accentColorId ?? this.accentColorId,
      username: username ?? this.username,
    );