copyWith method

AppUserData copyWith({
  1. int? id,
  2. String? userName,
  3. String? email,
  4. String? fullName,
  5. String? encryptedPassword,
  6. bool? enabled,
  7. bool? activated,
  8. Value<String?> accessToken = const Value.absent(),
  9. Value<int?> employeeId = const Value.absent(),
  10. Value<DateTime?> lastActiveDatetime = const Value.absent(),
  11. bool? isSystemUser,
  12. Value<String?> imagePath = const Value.absent(),
})

Implementation

AppUserData copyWith({
  int? id,
  String? userName,
  String? email,
  String? fullName,
  String? encryptedPassword,
  bool? enabled,
  bool? activated,
  Value<String?> accessToken = const Value.absent(),
  Value<int?> employeeId = const Value.absent(),
  Value<DateTime?> lastActiveDatetime = const Value.absent(),
  bool? isSystemUser,
  Value<String?> imagePath = const Value.absent(),
}) => AppUserData(
  id: id ?? this.id,
  userName: userName ?? this.userName,
  email: email ?? this.email,
  fullName: fullName ?? this.fullName,
  encryptedPassword: encryptedPassword ?? this.encryptedPassword,
  enabled: enabled ?? this.enabled,
  activated: activated ?? this.activated,
  accessToken: accessToken.present ? accessToken.value : this.accessToken,
  employeeId: employeeId.present ? employeeId.value : this.employeeId,
  lastActiveDatetime: lastActiveDatetime.present
      ? lastActiveDatetime.value
      : this.lastActiveDatetime,
  isSystemUser: isSystemUser ?? this.isSystemUser,
  imagePath: imagePath.present ? imagePath.value : this.imagePath,
);