diff --git a/lib/models/user_profile.dart b/lib/models/user_profile.dart index 01567f4..0d08c78 100644 --- a/lib/models/user_profile.dart +++ b/lib/models/user_profile.dart @@ -316,6 +316,9 @@ class UserProfile extends HiveObject { @HiveField(57) String? partnerId; // ID of the partner to sync with + @HiveField(58, defaultValue: true) + bool sharePadSupplies; // Share pad supply data with partner + UserProfile({ required this.id, required this.name, @@ -374,6 +377,7 @@ class UserProfile extends HiveObject { this.husbandAccentColor = '0xFF1A3A5C', this.useExampleData = false, this.partnerId, + this.sharePadSupplies = true, }); /// Check if user is married @@ -457,6 +461,7 @@ class UserProfile extends HiveObject { String? husbandAccentColor, bool? useExampleData, String? partnerId, + bool? sharePadSupplies, }) { return UserProfile( id: id ?? this.id, @@ -519,6 +524,7 @@ class UserProfile extends HiveObject { husbandAccentColor: husbandAccentColor ?? this.husbandAccentColor, useExampleData: useExampleData ?? this.useExampleData, partnerId: partnerId ?? this.partnerId, + sharePadSupplies: sharePadSupplies ?? this.sharePadSupplies, ); } } diff --git a/lib/models/user_profile.g.dart b/lib/models/user_profile.g.dart index b353ee7..b54b9f6 100644 --- a/lib/models/user_profile.g.dart +++ b/lib/models/user_profile.g.dart @@ -124,13 +124,14 @@ class UserProfileAdapter extends TypeAdapter { fields[55] == null ? '0xFF1A3A5C' : fields[55] as String, useExampleData: fields[56] == null ? false : fields[56] as bool, partnerId: fields[57] as String?, + sharePadSupplies: fields[58] == null ? true : fields[58] as bool, ); } @override void write(BinaryWriter writer, UserProfile obj) { writer - ..writeByte(57) + ..writeByte(58) ..writeByte(0) ..write(obj.id) ..writeByte(1) @@ -244,7 +245,9 @@ class UserProfileAdapter extends TypeAdapter { ..writeByte(56) ..write(obj.useExampleData) ..writeByte(57) - ..write(obj.partnerId); + ..write(obj.partnerId) + ..writeByte(58) + ..write(obj.sharePadSupplies); } @override