selfprivacy.org.app/lib/logic/models/hive/server.g.dart

45 lines
1.1 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'server.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class ServerAdapter extends TypeAdapter<Server> {
@override
final int typeId = 9;
@override
Server read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Server(
hostingDetails: fields[0] as ServerHostingDetails,
domain: fields[1] as ServerDomain,
);
}
@override
void write(BinaryWriter writer, Server obj) {
writer
..writeByte(2)
..writeByte(0)
..write(obj.hostingDetails)
..writeByte(1)
..write(obj.domain);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ServerAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}