copyWith method
User
copyWith({
- String? id,
- String? first_name,
- String? middle_name,
- String? last_name,
- String? mobile,
- String? email,
- String? national_id_number,
- String? passport_number,
- bool? is_superuser,
- String? role_id,
- String? referred_by,
- String? referee_id,
- String? referral_code,
- String? mobile_verified_at,
- String? email_verified_at,
- String? created_at,
- String? updated_at,
- String? corporate_name,
- String? corporate_reg_no,
- String? user_type_id,
- String? country_id,
- String? agent_type_ref,
- String? parent_ref,
- String? full_name,
- String? referrals_count,
Implementation
User copyWith({
String? id,
String? first_name,
String? middle_name,
String? last_name,
String? mobile,
String? email,
String? national_id_number,
String? passport_number,
bool? is_superuser,
String? role_id,
String? referred_by,
String? referee_id,
String? referral_code,
String? mobile_verified_at,
String? email_verified_at,
String? created_at,
String? updated_at,
String? corporate_name,
String? corporate_reg_no,
String? user_type_id,
String? country_id,
String? agent_type_ref,
String? parent_ref,
String? full_name,
String? referrals_count,
}) {
return User(
id: id ?? this.id,
first_name: first_name ?? this.first_name,
middle_name: middle_name ?? this.middle_name,
last_name: last_name ?? this.last_name,
mobile: mobile ?? this.mobile,
email: email ?? this.email,
national_id_number: national_id_number ?? this.national_id_number,
passport_number: passport_number ?? this.passport_number,
is_superuser: is_superuser ?? this.is_superuser,
role_id: role_id ?? this.role_id,
referred_by: referred_by ?? this.referred_by,
referee_id: referee_id ?? this.referee_id,
referral_code: referral_code ?? this.referral_code,
mobile_verified_at: mobile_verified_at ?? this.mobile_verified_at,
email_verified_at: email_verified_at ?? this.email_verified_at,
created_at: created_at ?? this.created_at,
updated_at: updated_at ?? this.updated_at,
corporate_name: corporate_name ?? this.corporate_name,
corporate_reg_no: corporate_reg_no ?? this.corporate_reg_no,
user_type_id: user_type_id ?? this.user_type_id,
country_id: country_id ?? this.country_id,
agent_type_ref: agent_type_ref ?? this.agent_type_ref,
parent_ref: parent_ref ?? this.parent_ref,
full_name: full_name ?? this.full_name,
referrals_count: referrals_count ?? this.referrals_count,
);
}