deserializeDbRelaySetItem function

  1. @isarProtected
DbRelaySetItem deserializeDbRelaySetItem(
  1. IsarReader reader
)

Implementation

@isarProtected
DbRelaySetItem deserializeDbRelaySetItem(IsarReader reader) {
  final String _url;
  _url = IsarCore.readString(reader, 1) ?? '';
  final List<DbPubkeyMapping> _pubKeyMappings;
  {
    final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        _pubKeyMappings = const <DbPubkeyMapping>[];
      } else {
        final list = List<DbPubkeyMapping>.filled(
            length,
            DbPubkeyMapping(
              pubKey: '',
              marker: '',
            ),
            growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = DbPubkeyMapping(
                pubKey: '',
                marker: '',
              );
            } else {
              final embedded = deserializeDbPubkeyMapping(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        _pubKeyMappings = list;
      }
    }
  }
  final object = DbRelaySetItem(
    _url,
    _pubKeyMappings,
  );
  return object;
}