copyWith method

Organization copyWith({
  1. String? id,
  2. String? name,
  3. String? slug,
  4. Map<String, dynamic>? metadata,
  5. DateTime? createdAt,
  6. DateTime? updatedAt,
})

Implementation

Organization copyWith({
  String? id,
  String? name,
  String? slug,
  String? logo,
  Map<String, dynamic>? metadata,
  DateTime? createdAt,
  DateTime? updatedAt,
}) {
  return Organization(
    id: id ?? this.id,
    name: name ?? this.name,
    slug: slug ?? this.slug,
    logo: logo ?? this.logo,
    metadata: metadata ?? this.metadata,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}