This commit is contained in:
2025-12-30 23:20:50 -06:00
parent 9f8eab4a31
commit ec923c906e
26 changed files with 2234 additions and 53 deletions

View File

@@ -46,6 +46,16 @@ enum BibleTranslation {
msg,
}
@HiveType(typeId: 11)
enum AppThemeMode {
@HiveField(0)
system,
@HiveField(1)
light,
@HiveField(2)
dark,
}
/// User profile model
@HiveType(typeId: 2)
class UserProfile extends HiveObject {
@@ -103,6 +113,31 @@ class UserProfile extends HiveObject {
@HiveField(18, defaultValue: false)
bool isDataShared;
@HiveField(19, defaultValue: AppThemeMode.system)
AppThemeMode themeMode;
@HiveField(20, defaultValue: '0xFFA8C5A8')
String accentColor;
// Sharing settings
@HiveField(21, defaultValue: true)
bool shareMoods;
@HiveField(22, defaultValue: true)
bool shareSymptoms;
@HiveField(23, defaultValue: true)
bool shareCravings;
@HiveField(24, defaultValue: true)
bool shareEnergyLevels;
@HiveField(25, defaultValue: true)
bool shareSleep;
@HiveField(26, defaultValue: true)
bool shareIntimacy;
UserProfile({
required this.id,
required this.name,
@@ -122,6 +157,14 @@ class UserProfile extends HiveObject {
this.bibleTranslation = BibleTranslation.esv,
this.favoriteFoods,
this.isDataShared = false,
this.themeMode = AppThemeMode.system,
this.accentColor = '0xFFA8C5A8',
this.shareMoods = true,
this.shareSymptoms = true,
this.shareCravings = true,
this.shareEnergyLevels = true,
this.shareSleep = true,
this.shareIntimacy = true,
});
/// Check if user is married
@@ -166,6 +209,14 @@ class UserProfile extends HiveObject {
BibleTranslation? bibleTranslation,
List<String>? favoriteFoods,
bool? isDataShared,
AppThemeMode? themeMode,
String? accentColor,
bool? shareMoods,
bool? shareSymptoms,
bool? shareCravings,
bool? shareEnergyLevels,
bool? shareSleep,
bool? shareIntimacy,
}) {
return UserProfile(
id: id ?? this.id,
@@ -187,6 +238,14 @@ class UserProfile extends HiveObject {
bibleTranslation: bibleTranslation ?? this.bibleTranslation,
favoriteFoods: favoriteFoods ?? this.favoriteFoods,
isDataShared: isDataShared ?? this.isDataShared,
themeMode: themeMode ?? this.themeMode,
accentColor: accentColor ?? this.accentColor,
shareMoods: shareMoods ?? this.shareMoods,
shareSymptoms: shareSymptoms ?? this.shareSymptoms,
shareCravings: shareCravings ?? this.shareCravings,
shareEnergyLevels: shareEnergyLevels ?? this.shareEnergyLevels,
shareSleep: shareSleep ?? this.shareSleep,
shareIntimacy: shareIntimacy ?? this.shareIntimacy,
);
}
}