copyWith method

UserModel copyWith({
  1. String? uid,
  2. String? email,
  3. String? phoneNumber,
  4. String? displayName,
  5. String? photoUrl,
  6. bool? isEmailVerified,
  7. bool? isPhoneVerified,
  8. DateTime? createdAt,
  9. Map<String, dynamic>? metadata,
})

Implementation

UserModel copyWith({
  String? uid,
  String? email,
  String? phoneNumber,
  String? displayName,
  String? photoUrl,
  bool? isEmailVerified,
  bool? isPhoneVerified,
  DateTime? createdAt,
  Map<String, dynamic>? metadata,
}) {
  return UserModel(
    uid: uid ?? this.uid,
    email: email ?? this.email,
    phoneNumber: phoneNumber ?? this.phoneNumber,
    displayName: displayName ?? this.displayName,
    photoUrl: photoUrl ?? this.photoUrl,
    isEmailVerified: isEmailVerified ?? this.isEmailVerified,
    isPhoneVerified: isPhoneVerified ?? this.isPhoneVerified,
    createdAt: createdAt ?? this.createdAt,
    metadata: metadata ?? this.metadata,
  );
}