copyWith method

TeacherData copyWith({
  1. int? id,
  2. String? fullName,
  3. DateTime? birthday,
  4. String? genderId,
  5. String? teacherPositionId,
  6. bool? locked,
  7. bool? active,
  8. int? universityId,
  9. Value<String?> countryId = const Value.absent(),
  10. Value<String?> youtubeVideoCode = const Value.absent(),
  11. String? email,
  12. Value<String?> skype = const Value.absent(),
  13. Value<String?> facebook = const Value.absent(),
  14. Value<String?> phoneNumber = const Value.absent(),
  15. Value<String?> description = const Value.absent(),
  16. Value<String?> note = const Value.absent(),
  17. Value<String?> imagePath = const Value.absent(),
})

Implementation

TeacherData copyWith({
  int? id,
  String? fullName,
  DateTime? birthday,
  String? genderId,
  String? teacherPositionId,
  bool? locked,
  bool? active,
  int? universityId,
  Value<String?> countryId = const Value.absent(),
  Value<String?> youtubeVideoCode = const Value.absent(),
  String? email,
  Value<String?> skype = const Value.absent(),
  Value<String?> facebook = const Value.absent(),
  Value<String?> phoneNumber = const Value.absent(),
  Value<String?> description = const Value.absent(),
  Value<String?> note = const Value.absent(),
  Value<String?> imagePath = const Value.absent(),
}) => TeacherData(
  id: id ?? this.id,
  fullName: fullName ?? this.fullName,
  birthday: birthday ?? this.birthday,
  genderId: genderId ?? this.genderId,
  teacherPositionId: teacherPositionId ?? this.teacherPositionId,
  locked: locked ?? this.locked,
  active: active ?? this.active,
  universityId: universityId ?? this.universityId,
  countryId: countryId.present ? countryId.value : this.countryId,
  youtubeVideoCode: youtubeVideoCode.present
      ? youtubeVideoCode.value
      : this.youtubeVideoCode,
  email: email ?? this.email,
  skype: skype.present ? skype.value : this.skype,
  facebook: facebook.present ? facebook.value : this.facebook,
  phoneNumber: phoneNumber.present ? phoneNumber.value : this.phoneNumber,
  description: description.present ? description.value : this.description,
  note: note.present ? note.value : this.note,
  imagePath: imagePath.present ? imagePath.value : this.imagePath,
);