Add household sharing feature
✨ 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>
This commit is contained in:
@@ -22,13 +22,15 @@ class AppSettingsAdapter extends TypeAdapter<AppSettings> {
|
||||
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(5)
|
||||
..writeByte(7)
|
||||
..writeByte(0)
|
||||
..write(obj.discordWebhookUrl)
|
||||
..writeByte(1)
|
||||
@@ -38,7 +40,11 @@ class AppSettingsAdapter extends TypeAdapter<AppSettings> {
|
||||
..writeByte(3)
|
||||
..write(obj.defaultView)
|
||||
..writeByte(4)
|
||||
..write(obj.sortBy);
|
||||
..write(obj.sortBy)
|
||||
..writeByte(5)
|
||||
..write(obj.userName)
|
||||
..writeByte(6)
|
||||
..write(obj.currentHouseholdId);
|
||||
}
|
||||
|
||||
@override
|
||||
|
Reference in New Issue
Block a user