copyWith method

UserStatusInfo copyWith({
  1. UserStatusType? type,
  2. String? customMessage,
  3. int? lastSeenAt,
  4. bool? needsUpdate,
})

Tạo bản sao với các thay đổi

Implementation

UserStatusInfo copyWith({
  UserStatusType? type,
  String? customMessage,
  int? lastSeenAt,
  bool? needsUpdate,
}) {
  return UserStatusInfo(
    userId: this.userId,
    type: type ?? this.type,
    customMessage: customMessage ?? this.customMessage,
    lastSeenAt: lastSeenAt ?? this.lastSeenAt,
    needsUpdate: needsUpdate ?? this.needsUpdate,
  );
}