mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-07 04:26:56 +00:00
45 lines
1 KiB
Dart
45 lines
1 KiB
Dart
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||
|
|
||
|
part of 'user.dart';
|
||
|
|
||
|
// **************************************************************************
|
||
|
// TypeAdapterGenerator
|
||
|
// **************************************************************************
|
||
|
|
||
|
class UserAdapter extends TypeAdapter<User> {
|
||
|
@override
|
||
|
final int typeId = 1;
|
||
|
|
||
|
@override
|
||
|
User read(BinaryReader reader) {
|
||
|
final numOfFields = reader.readByte();
|
||
|
final fields = <int, dynamic>{
|
||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||
|
};
|
||
|
return User(
|
||
|
login: fields[0] as String,
|
||
|
password: fields[1] as String,
|
||
|
);
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
void write(BinaryWriter writer, User obj) {
|
||
|
writer
|
||
|
..writeByte(2)
|
||
|
..writeByte(0)
|
||
|
..write(obj.login)
|
||
|
..writeByte(1)
|
||
|
..write(obj.password);
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
int get hashCode => typeId.hashCode;
|
||
|
|
||
|
@override
|
||
|
bool operator ==(Object other) =>
|
||
|
identical(this, other) ||
|
||
|
other is UserAdapter &&
|
||
|
runtimeType == other.runtimeType &&
|
||
|
typeId == other.typeId;
|
||
|
}
|