copyWith method
Creates a copy of ChannelModel with specified attributes overridden.
Implementation
ChannelModel copyWith({
String? id,
String? type,
String? cid,
ChannelConfig? config,
User? createdBy,
bool? frozen,
DateTime? lastMessageAt,
DateTime? createdAt,
DateTime? updatedAt,
DateTime? deletedAt,
int? memberCount,
Map<String, Object?>? extraData,
String? team,
int? cooldown,
}) =>
ChannelModel(
id: id ?? this.id,
type: type ?? this.type,
cid: cid ?? this.cid,
config: config ?? this.config,
createdBy: createdBy ?? this.createdBy,
frozen: frozen ?? this.frozen,
lastMessageAt: lastMessageAt ?? this.lastMessageAt,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
deletedAt: deletedAt ?? this.deletedAt,
memberCount: memberCount ?? this.memberCount,
extraData: extraData ?? this.extraData,
team: team ?? this.team,
cooldown: cooldown ?? this.cooldown,
);