Implement husband-wife connection dialogue and theme support for learn articles

This commit is contained in:
2026-01-05 17:09:15 -06:00
parent 02d25d0cc7
commit 96655f9a74
36 changed files with 3849 additions and 819 deletions

View File

@@ -1,4 +1,5 @@
import 'package:hive/hive.dart';
import 'teaching_plan.dart';
part 'user_profile.g.dart';
@@ -184,6 +185,12 @@ class UserProfile extends HiveObject {
@HiveField(15, defaultValue: false)
bool isIrregularCycle;
@HiveField(41, defaultValue: 21)
int minCycleLength;
@HiveField(42, defaultValue: 40)
int maxCycleLength;
@HiveField(16, defaultValue: BibleTranslation.esv)
BibleTranslation bibleTranslation;
@@ -262,6 +269,39 @@ class UserProfile extends HiveObject {
@HiveField(40, defaultValue: false)
bool showPadTimerSeconds;
@HiveField(43, defaultValue: false)
bool notifyPad1Hour;
@HiveField(44, defaultValue: false)
bool notifyPad2Hours;
@HiveField(45)
String? privacyPin;
@HiveField(46, defaultValue: false)
bool isBioProtected;
@HiveField(47, defaultValue: false)
bool isHistoryProtected;
@HiveField(48, defaultValue: false)
bool notifyPad30Mins;
@HiveField(49, defaultValue: true)
bool notifyPadNow;
@HiveField(50, defaultValue: false)
bool isLogProtected;
@HiveField(51, defaultValue: false)
bool isCalendarProtected;
@HiveField(52, defaultValue: false)
bool isSuppliesProtected;
@HiveField(53)
List<TeachingPlan>? teachingPlans;
UserProfile({
required this.id,
required this.name,
@@ -277,6 +317,8 @@ class UserProfile extends HiveObject {
this.partnerName,
this.role = UserRole.wife,
this.isIrregularCycle = false,
this.minCycleLength = 21,
this.maxCycleLength = 40,
this.bibleTranslation = BibleTranslation.esv,
this.favoriteFoods,
this.isDataShared = false,
@@ -303,6 +345,17 @@ class UserProfile extends HiveObject {
this.padSupplies,
this.showPadTimerMinutes = true,
this.showPadTimerSeconds = false,
this.notifyPad1Hour = false,
this.notifyPad2Hours = false,
this.privacyPin,
this.isBioProtected = false,
this.isHistoryProtected = false,
this.notifyPad30Mins = false,
this.notifyPadNow = true,
this.isLogProtected = false,
this.isCalendarProtected = false,
this.isSuppliesProtected = false,
this.teachingPlans,
});
/// Check if user is married
@@ -343,6 +396,8 @@ class UserProfile extends HiveObject {
String? partnerName,
UserRole? role,
bool? isIrregularCycle,
int? minCycleLength,
int? maxCycleLength,
BibleTranslation? bibleTranslation,
List<String>? favoriteFoods,
bool? isDataShared,
@@ -369,6 +424,17 @@ class UserProfile extends HiveObject {
List<SupplyItem>? padSupplies,
bool? showPadTimerMinutes,
bool? showPadTimerSeconds,
bool? notifyPad1Hour,
bool? notifyPad2Hours,
String? privacyPin,
bool? isBioProtected,
bool? isHistoryProtected,
bool? notifyPad30Mins,
bool? notifyPadNow,
bool? isLogProtected,
bool? isCalendarProtected,
bool? isSuppliesProtected,
List<TeachingPlan>? teachingPlans,
}) {
return UserProfile(
id: id ?? this.id,
@@ -386,6 +452,8 @@ class UserProfile extends HiveObject {
partnerName: partnerName ?? this.partnerName,
role: role ?? this.role,
isIrregularCycle: isIrregularCycle ?? this.isIrregularCycle,
minCycleLength: minCycleLength ?? this.minCycleLength,
maxCycleLength: maxCycleLength ?? this.maxCycleLength,
bibleTranslation: bibleTranslation ?? this.bibleTranslation,
favoriteFoods: favoriteFoods ?? this.favoriteFoods,
isDataShared: isDataShared ?? this.isDataShared,
@@ -412,6 +480,17 @@ class UserProfile extends HiveObject {
padSupplies: padSupplies ?? this.padSupplies,
showPadTimerMinutes: showPadTimerMinutes ?? this.showPadTimerMinutes,
showPadTimerSeconds: showPadTimerSeconds ?? this.showPadTimerSeconds,
notifyPad1Hour: notifyPad1Hour ?? this.notifyPad1Hour,
notifyPad2Hours: notifyPad2Hours ?? this.notifyPad2Hours,
privacyPin: privacyPin ?? this.privacyPin,
isBioProtected: isBioProtected ?? this.isBioProtected,
isHistoryProtected: isHistoryProtected ?? this.isHistoryProtected,
notifyPad30Mins: notifyPad30Mins ?? this.notifyPad30Mins,
notifyPadNow: notifyPadNow ?? this.notifyPadNow,
isLogProtected: isLogProtected ?? this.isLogProtected,
isCalendarProtected: isCalendarProtected ?? this.isCalendarProtected,
isSuppliesProtected: isSuppliesProtected ?? this.isSuppliesProtected,
teachingPlans: teachingPlans ?? this.teachingPlans,
);
}
}