Files
BudgetApp/lib/hive/hive_adapters.g.dart
T
Sanders 8b75299d41 Refactors data repositories for single-user mode
This commit refactors the data repositories to remove user-specific filtering. It simplifies the data access logic by retrieving all data from the Hive boxes and removing the need to filter by `userId` in the repository methods.

This change makes the app function in single-user mode and removes the need to manage multiple user contexts within the data layer.

Specifically:
- Removes `userId` parameter from repository methods.
- Updates the setting repository to use fixed keys.
- Removes user ID filtering from queries.
- Removes user ID parameters from Cubits and Blocs
- Updates initial data creation
2025-07-12 21:54:00 +03:00

54 lines
1.4 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'hive_adapters.dart';
// **************************************************************************
// AdaptersGenerator
// **************************************************************************
class IconDataAdapter extends TypeAdapter<IconData> {
@override
final typeId = 1;
@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;
}