copyWith method
User
copyWith({
- String? username,
- String? userID,
- String? firstName,
- String? middleName,
- String? familyName,
- String? preferredName,
- String? emailAddress,
- bool? emailAddressVerified,
- String? mobilePhone,
- bool? mobilePhoneVerified,
- String? profilePictureUrl,
- String? defaultOrg,
- String? defaultSpace,
- bool? rememberFor24h,
- bool? enableBiometric,
- bool? enableMFA,
- bool? enableTOTP,
- Map<
String, String?> userProfile = const {},
Implementation
User copyWith({
String? username,
String? userID,
String? firstName,
String? middleName,
String? familyName,
String? preferredName,
String? emailAddress,
bool? emailAddressVerified,
String? mobilePhone,
bool? mobilePhoneVerified,
String? profilePictureUrl,
String? defaultOrg,
String? defaultSpace,
bool? rememberFor24h,
bool? enableBiometric,
bool? enableMFA,
bool? enableTOTP,
Map<String, String?> userProfile = const {},
}) {
return User(
username: username ?? this.username,
userID: userID ?? this.userID,
firstName: firstName ?? this.firstName,
middleName: middleName ?? this.middleName,
familyName: familyName ?? this.familyName,
preferredName: preferredName ?? this.preferredName,
emailAddress: emailAddress ?? this.emailAddress,
emailAddressVerified: emailAddressVerified ?? this.emailAddressVerified,
mobilePhone: mobilePhone ?? this.mobilePhone,
mobilePhoneVerified: mobilePhoneVerified ?? this.mobilePhoneVerified,
profilePictureUrl: profilePictureUrl ?? this.profilePictureUrl,
defaultOrg: defaultOrg ?? this.defaultOrg,
defaultSpace: defaultSpace ?? this.defaultSpace,
rememberFor24h: rememberFor24h ?? this.rememberFor24h,
enableBiometric: enableBiometric ?? this.enableBiometric,
enableMFA: enableMFA ?? this.enableMFA,
enableTOTP: enableTOTP ?? this.enableTOTP,
userProfile: Map<String, String?>.from(this.userProfile)
..addAll(userProfile),
);
}