Small fix

This commit is contained in:
2025-06-27 16:02:30 +03:00
parent caff9bac1f
commit 5f78dfb603
10 changed files with 8 additions and 118 deletions
-85
View File
@@ -1,85 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'hive_adapters.dart';
// **************************************************************************
// AdaptersGenerator
// **************************************************************************
class ColorAdapter extends TypeAdapter<Color> {
@override
final typeId = 3;
@override
Color read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Color((fields[0] as num).toInt());
}
@override
void write(BinaryWriter writer, Color obj) {
writer
..writeByte(1)
..writeByte(0)
..write(obj.value);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ColorAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class IconDataAdapter extends TypeAdapter<IconData> {
@override
final typeId = 4;
@override
IconData read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return IconData(
(fields[0] as num).toInt(),
fontFamily: fields[1] as String?,
fontPackage: fields[2] as String?,
matchTextDirection: fields[3] == null ? false : fields[3] as bool,
fontFamilyFallback: (fields[4] as List?)?.cast<String>(),
);
}
@override
void write(BinaryWriter writer, IconData obj) {
writer
..writeByte(5)
..writeByte(0)
..write(obj.codePoint)
..writeByte(1)
..write(obj.fontFamily)
..writeByte(2)
..write(obj.fontPackage)
..writeByte(3)
..write(obj.matchTextDirection)
..writeByte(4)
..write(obj.fontFamilyFallback);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is IconDataAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
-25
View File
@@ -1,25 +0,0 @@
# Generated by Hive CE
# Manual modifications may be necessary for certain migrations
# Check in to version control
nextTypeId: 6
types:
Color:
typeId: 3
nextIndex: 1
fields:
value:
index: 0
IconData:
typeId: 4
nextIndex: 5
fields:
codePoint:
index: 0
fontFamily:
index: 1
fontPackage:
index: 2
matchTextDirection:
index: 3
fontFamilyFallback:
index: 4
+1 -1
View File
@@ -4,7 +4,7 @@ import '../utils/id_generator.dart';
part 'category.g.dart';
@HiveType(typeId: 0)
@HiveType(typeId: 1000)
/// Модель категории для группировки транзакций
/// Содержит основные параметры для визуализации и классификации
+1 -1
View File
@@ -8,7 +8,7 @@ part of 'category.dart';
class CategoryAdapter extends TypeAdapter<Category> {
@override
final typeId = 0;
final typeId = 1000;
@override
Category read(BinaryReader reader) {
+1 -1
View File
@@ -3,7 +3,7 @@ import '../../utils/id_generator.dart';
part 'tag.g.dart';
@HiveType(typeId: 1)
@HiveType(typeId: 1001)
class Tag {
@HiveField(0)
/// Уникальный идентификатор тега
+1 -1
View File
@@ -8,7 +8,7 @@ part of 'tag.dart';
class TagAdapter extends TypeAdapter<Tag> {
@override
final typeId = 1;
final typeId = 1001;
@override
Tag read(BinaryReader reader) {
+1 -1
View File
@@ -6,7 +6,7 @@ import 'tag.dart';
part 'transaction_record.g.dart';
@HiveType(typeId: 2)
@HiveType(typeId: 1002)
/// Модель записи о транзакции - основной элемент учета бюджета
/// Содержит все детали финансовой операции
class TransactionRecord {
+1 -1
View File
@@ -8,7 +8,7 @@ part of 'transaction_record.dart';
class TransactionRecordAdapter extends TypeAdapter<TransactionRecord> {
@override
final typeId = 2;
final typeId = 1002;
@override
TransactionRecord read(BinaryReader reader) {
+1 -1
View File
@@ -5,7 +5,7 @@ import '../utils/id_generator.dart';
// typeId: 3 - уникальный идентификатор типа для Hive (у нас уже есть 0,1,2)
part 'user.g.dart';
@HiveType(typeId: 3)
@HiveType(typeId: 1003)
/// Модель пользователя приложения
/// Содержит основную информацию для идентификации пользователя
class User {
+1 -1
View File
@@ -8,7 +8,7 @@ part of 'user.dart';
class UserAdapter extends TypeAdapter<User> {
@override
final typeId = 3;
final typeId = 1003;
@override
User read(BinaryReader reader) {