✨ Features: - Create household with 6-character shareable code - Join existing household with code - View household members and owner - Leave household functionality - Automatic inventory filtering by household - Persistent household settings across app updates 🔧 Technical changes: - Added Household model with Hive adapter (typeId: 4) - Updated AppSettings with userName and currentHouseholdId fields - Modified InventoryRepository to filter items by household - Updated Add Item screen to set householdId on new items - Added HouseholdScreen with full CRUD operations - Integrated household sharing into Settings navigation 🎯 Behavior: - Users not in a household see only their personal items - Users in a household see shared household items - New items automatically tagged with current household 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
1.6 KiB
Dart
60 lines
1.6 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'app_settings.dart';
|
|
|
|
// **************************************************************************
|
|
// TypeAdapterGenerator
|
|
// **************************************************************************
|
|
|
|
class AppSettingsAdapter extends TypeAdapter<AppSettings> {
|
|
@override
|
|
final int typeId = 3;
|
|
|
|
@override
|
|
AppSettings read(BinaryReader reader) {
|
|
final numOfFields = reader.readByte();
|
|
final fields = <int, dynamic>{
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
};
|
|
return AppSettings(
|
|
discordWebhookUrl: fields[0] as String?,
|
|
expirationAlertsEnabled: fields[1] as bool,
|
|
discordNotificationsEnabled: fields[2] as bool,
|
|
defaultView: fields[3] as String,
|
|
sortBy: fields[4] as String,
|
|
userName: fields[5] as String?,
|
|
currentHouseholdId: fields[6] as String?,
|
|
);
|
|
}
|
|
|
|
@override
|
|
void write(BinaryWriter writer, AppSettings obj) {
|
|
writer
|
|
..writeByte(7)
|
|
..writeByte(0)
|
|
..write(obj.discordWebhookUrl)
|
|
..writeByte(1)
|
|
..write(obj.expirationAlertsEnabled)
|
|
..writeByte(2)
|
|
..write(obj.discordNotificationsEnabled)
|
|
..writeByte(3)
|
|
..write(obj.defaultView)
|
|
..writeByte(4)
|
|
..write(obj.sortBy)
|
|
..writeByte(5)
|
|
..write(obj.userName)
|
|
..writeByte(6)
|
|
..write(obj.currentHouseholdId);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is AppSettingsAdapter &&
|
|
runtimeType == other.runtimeType &&
|
|
typeId == other.typeId;
|
|
}
|