copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
ChatMessageSender copyWith({MessageSender? sender, bool? needsPremium}) =>
ChatMessageSender(
sender: sender ?? this.sender,
needsPremium: needsPremium ?? this.needsPremium,
);