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
ChatPosition copyWith({
ChatList? list,
int? order,
bool? isPinned,
ChatSource? Function()? source,
}) =>
ChatPosition(
list: list ?? this.list,
order: order ?? this.order,
isPinned: isPinned ?? this.isPinned,
source: source != null ? source() : this.source,
);