Skip to content
Snippets Groups Projects
Commit 0cf97125 authored by Florian Schindler's avatar Florian Schindler
Browse files

Update category.g.dart

parent 171f7c25
No related branches found
No related tags found
No related merge requests found
......@@ -17,24 +17,27 @@ class CategoryAdapter extends TypeAdapter<Category> {
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Category(
title: fields[0] as String,
icon: fields[1] as IconData,
color: fields[2] as Color,
budget: fields[3] as double,
id: fields[0] as int,
title: fields[1] as String,
icon: fields[2] as IconData,
color: fields[3] as Color,
budget: fields[4] as double,
);
}
@override
void write(BinaryWriter writer, Category obj) {
writer
..writeByte(4)
..writeByte(5)
..writeByte(0)
..write(obj.title)
..write(obj.id)
..writeByte(1)
..write(obj.icon)
..write(obj.title)
..writeByte(2)
..write(obj.color)
..write(obj.icon)
..writeByte(3)
..write(obj.color)
..writeByte(4)
..write(obj.budget);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment