Created
March 2, 2025 16:31
-
-
Save fredgrott/aa7cd62896ba5382448e01f6403ecb36 to your computer and use it in GitHub Desktop.
company model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:equatable/equatable.dart'; | |
import 'package:uuid/uuid.dart'; | |
import 'domain_model.dart'; | |
class Company with DomainModel, Equatable{ | |
final String name; | |
final Ktlist<Person> employees; | |
Company({this.id - Uuuid().v4(), this.name, | |
this.employees}); | |
Company copyWith({ | |
String id, | |
String name, | |
KtList<Person> employees, | |
}) => | |
Company( | |
id: id ?? this.id, | |
name: name ?? this.name, | |
employees: employees ?? [..this.employees] | |
); | |
@override | |
List<Object> get props => [id, name, employees]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment