deserializeDbUserRelayListProp function

  1. @isarProtected
dynamic deserializeDbUserRelayListProp(
  1. IsarReader reader,
  2. int property
)

Implementation

@isarProtected
dynamic deserializeDbUserRelayListProp(IsarReader reader, int property) {
  switch (property) {
    case 1:
      return IsarCore.readString(reader, 1) ?? '';
    case 2:
      return IsarCore.readString(reader, 2) ?? '';
    case 3:
      return IsarCore.readLong(reader, 3);
    case 4:
      return IsarCore.readLong(reader, 4);
    case 5:
      {
        final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return const <DbRelayListItem>[];
          } else {
            final list = List<DbRelayListItem>.filled(
                length,
                DbRelayListItem(
                  '',
                  ReadWriteMarker.readOnly,
                ),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = DbRelayListItem(
                    '',
                    ReadWriteMarker.readOnly,
                  );
                } else {
                  final embedded = deserializeDbRelayListItem(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    default:
      throw ArgumentError('Unknown property: $property');
  }
}