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
54 lines
1.3 KiB
Dart
54 lines
1.3 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'sms_message.dart';
|
|
|
|
// **************************************************************************
|
|
// TypeAdapterGenerator
|
|
// **************************************************************************
|
|
|
|
class SmsMessageAdapter extends TypeAdapter<SmsMessage> {
|
|
@override
|
|
final typeId = 1004;
|
|
|
|
@override
|
|
SmsMessage read(BinaryReader reader) {
|
|
final numOfFields = reader.readByte();
|
|
final fields = <int, dynamic>{
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
};
|
|
return SmsMessage(
|
|
id: fields[0] as String?,
|
|
body: fields[1] as String?,
|
|
sender: fields[2] as String?,
|
|
date: fields[3] as DateTime?,
|
|
transactionId: fields[4] as String?,
|
|
);
|
|
}
|
|
|
|
@override
|
|
void write(BinaryWriter writer, SmsMessage obj) {
|
|
writer
|
|
..writeByte(5)
|
|
..writeByte(0)
|
|
..write(obj.id)
|
|
..writeByte(1)
|
|
..write(obj.body)
|
|
..writeByte(2)
|
|
..write(obj.sender)
|
|
..writeByte(3)
|
|
..write(obj.date)
|
|
..writeByte(4)
|
|
..write(obj.transactionId);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is SmsMessageAdapter &&
|
|
runtimeType == other.runtimeType &&
|
|
typeId == other.typeId;
|
|
}
|