copyWith method

ChatPosition copyWith({
  1. ChatList? list,
  2. int? order,
  3. bool? isPinned,
  4. ChatSource? source()?,
})

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,
    );