horario pro
This commit is contained in:
@@ -29,6 +29,27 @@ class Schedules extends Equatable {
|
||||
sunday: ScheduleEntity.empty,
|
||||
);
|
||||
|
||||
// Copy function
|
||||
Schedules copyWith({
|
||||
ScheduleEntity? monday,
|
||||
ScheduleEntity? tuesday,
|
||||
ScheduleEntity? wednesday,
|
||||
ScheduleEntity? thursday,
|
||||
ScheduleEntity? friday,
|
||||
ScheduleEntity? saturday,
|
||||
ScheduleEntity? sunday,
|
||||
}) {
|
||||
return Schedules(
|
||||
monday: monday ?? this.monday,
|
||||
tuesday: tuesday ?? this.tuesday,
|
||||
wednesday: wednesday ?? this.wednesday,
|
||||
thursday: thursday ?? this.thursday,
|
||||
friday: friday ?? this.friday,
|
||||
saturday: saturday ?? this.saturday,
|
||||
sunday: sunday ?? this.sunday,
|
||||
);
|
||||
}
|
||||
|
||||
factory Schedules.fromDocument(Map<String, dynamic> doc) {
|
||||
return Schedules(
|
||||
monday: ScheduleEntity.fromDocument(doc['monday']),
|
||||
|
||||
Reference in New Issue
Block a user