copyWith method
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(),
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,
);