Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created March 2, 2025 16:31
Show Gist options
  • Save fredgrott/aa7cd62896ba5382448e01f6403ecb36 to your computer and use it in GitHub Desktop.
Save fredgrott/aa7cd62896ba5382448e01f6403ecb36 to your computer and use it in GitHub Desktop.
company model
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