30 lines
519 B
Dart
30 lines
519 B
Dart
class Organization {
|
|
final String? id;
|
|
final String title;
|
|
|
|
Organization({
|
|
this.id,
|
|
required this.title
|
|
});
|
|
|
|
Organization copyWith(String? id, String? title) {
|
|
return Organization(
|
|
id: id ?? this.id,
|
|
title: title ?? this.title
|
|
);
|
|
}
|
|
|
|
factory Organization.fromJson(Map<String, dynamic> json) {
|
|
return Organization(
|
|
id: json['id'],
|
|
title: json['title'],
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'id': id,
|
|
'title': title,
|
|
};
|
|
}
|
|
} |