toCompanion method

UsersCompanion toCompanion(
  1. bool nullToAbsent
)

Implementation

UsersCompanion toCompanion(bool nullToAbsent) {
  return UsersCompanion(
    id: Value(id),
    num: Value(num),
    name: name == null && nullToAbsent ? const Value.absent() : Value(name),
    bio: bio == null && nullToAbsent ? const Value.absent() : Value(bio),
    avatar:
        avatar == null && nullToAbsent ? const Value.absent() : Value(avatar),
    callCover: callCover == null && nullToAbsent
        ? const Value.absent()
        : Value(callCover),
    mutualContactsCount: Value(mutualContactsCount),
    online: Value(online),
    presenceIndex: presenceIndex == null && nullToAbsent
        ? const Value.absent()
        : Value(presenceIndex),
    status:
        status == null && nullToAbsent ? const Value.absent() : Value(status),
    isDeleted: Value(isDeleted),
    dialog:
        dialog == null && nullToAbsent ? const Value.absent() : Value(dialog),
    isBlocked: isBlocked == null && nullToAbsent
        ? const Value.absent()
        : Value(isBlocked),
    lastSeenAt: lastSeenAt == null && nullToAbsent
        ? const Value.absent()
        : Value(lastSeenAt),
    contacts: Value(contacts),
    ver: Value(ver),
    blockedVer: Value(blockedVer),
    welcomeMessage: welcomeMessage == null && nullToAbsent
        ? const Value.absent()
        : Value(welcomeMessage),
  );
}