copyWith method

User copyWith({
  1. UserType? type,
  2. String? username,
  3. String? userKey,
  4. String? accountId,
  5. UserAccountType? accountType,
  6. String? email,
  7. String? publicName,
  8. Icon? profilePicture,
  9. String? displayName,
  10. String? timeZone,
  11. bool? isExternalCollaborator,
  12. bool? externalCollaborator,
  13. List<OperationCheckResult>? operations,
  14. UserDetails? details,
  15. Space? personalSpace,
  16. UserExpandable? expandable,
  17. GenericLinks? links,
})

Implementation

User copyWith(
    {UserType? type,
    String? username,
    String? userKey,
    String? accountId,
    UserAccountType? accountType,
    String? email,
    String? publicName,
    Icon? profilePicture,
    String? displayName,
    String? timeZone,
    bool? isExternalCollaborator,
    bool? externalCollaborator,
    List<OperationCheckResult>? operations,
    UserDetails? details,
    Space? personalSpace,
    UserExpandable? expandable,
    GenericLinks? links}) {
  return User(
    type: type ?? this.type,
    username: username ?? this.username,
    userKey: userKey ?? this.userKey,
    accountId: accountId ?? this.accountId,
    accountType: accountType ?? this.accountType,
    email: email ?? this.email,
    publicName: publicName ?? this.publicName,
    profilePicture: profilePicture ?? this.profilePicture,
    displayName: displayName ?? this.displayName,
    timeZone: timeZone ?? this.timeZone,
    isExternalCollaborator:
        isExternalCollaborator ?? this.isExternalCollaborator,
    externalCollaborator: externalCollaborator ?? this.externalCollaborator,
    operations: operations ?? this.operations,
    details: details ?? this.details,
    personalSpace: personalSpace ?? this.personalSpace,
    expandable: expandable ?? this.expandable,
    links: links ?? this.links,
  );
}