Files
1356/lifetimer/lib/data/models/cached_goal_model.g.dart
2026-04-10 12:05:40 +02:00

78 lines
2.0 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'cached_goal_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class CachedGoalAdapter extends TypeAdapter<CachedGoal> {
@override
final int typeId = 0;
@override
CachedGoal read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return CachedGoal(
id: fields[0] as String,
ownerId: fields[1] as String,
title: fields[2] as String,
description: fields[3] as String?,
progress: fields[4] as int,
locationLat: fields[5] as double?,
locationLng: fields[6] as double?,
locationName: fields[7] as String?,
imageUrl: fields[8] as String?,
completed: fields[9] as bool,
createdAt: fields[10] as DateTime,
updatedAt: fields[11] as DateTime,
isDirty: fields[12] as bool,
);
}
@override
void write(BinaryWriter writer, CachedGoal obj) {
writer
..writeByte(13)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.ownerId)
..writeByte(2)
..write(obj.title)
..writeByte(3)
..write(obj.description)
..writeByte(4)
..write(obj.progress)
..writeByte(5)
..write(obj.locationLat)
..writeByte(6)
..write(obj.locationLng)
..writeByte(7)
..write(obj.locationName)
..writeByte(8)
..write(obj.imageUrl)
..writeByte(9)
..write(obj.completed)
..writeByte(10)
..write(obj.createdAt)
..writeByte(11)
..write(obj.updatedAt)
..writeByte(12)
..write(obj.isDirty);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is CachedGoalAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}