Flutter-Ernaehrungsapp/lib/android/models/user.g.dart

57 lines
1.3 KiB
Dart
Raw Permalink Normal View History

2023-05-31 23:22:38 +02:00
// 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(
fields[0] as String,
fields[1] as String,
fields[2] as int,
fields[3] as int,
fields[4] as int,
fields[5] as int,
);
}
@override
void write(BinaryWriter writer, User obj) {
writer
..writeByte(6)
..writeByte(0)
..write(obj.vorname)
..writeByte(1)
..write(obj.nachname)
..writeByte(2)
..write(obj.gewicht)
..writeByte(3)
..write(obj.groesse)
..writeByte(4)
..write(obj.alter)
..writeByte(5)
..write(obj.kalorien);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is UserAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}