copyWith method
Community
copyWith({
- int? id,
- bool? haveAccess,
- String? name,
- ChatPhotoInfo? photo()?,
- int? date,
- CommunityMemberStatus? status,
- CommunityPermissions? permissions,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
Community copyWith({
int? id,
bool? haveAccess,
String? name,
ChatPhotoInfo? Function()? photo,
int? date,
CommunityMemberStatus? status,
CommunityPermissions? permissions,
}) => Community(
id: id ?? this.id,
haveAccess: haveAccess ?? this.haveAccess,
name: name ?? this.name,
photo: photo != null ? photo() : this.photo,
date: date ?? this.date,
status: status ?? this.status,
permissions: permissions ?? this.permissions,
);