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

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../models/user_profile.dart';
import '../../providers/user_provider.dart';
import '../../models/teaching_plan.dart';
class RelationshipSettingsScreen extends ConsumerWidget {
const RelationshipSettingsScreen({super.key});
@@ -23,6 +24,34 @@ class RelationshipSettingsScreen extends ConsumerWidget {
'Select your current relationship status to customize your experience.',
style: TextStyle(fontSize: 16),
),
const SizedBox(height: 16),
// Sample Data Button
Center(
child: TextButton.icon(
onPressed: () {
final user = ref.read(userProfileProvider);
if (user != null) {
final samplePlan = TeachingPlan.create(
topic: 'Walking in Love',
scriptureReference: 'Ephesians 5:1-2',
notes: 'As Christ loved us and gave himself up for us, a fragrant offering and sacrifice to God. Let our marriage reflect this sacrificial love.',
date: DateTime.now(),
);
final List<TeachingPlan> updatedPlans = [...(user.teachingPlans ?? []), samplePlan];
ref.read(userProfileProvider.notifier).updateProfile(
user.copyWith(teachingPlans: updatedPlans)
);
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Sample Teaching Plan Loaded! Check Devotional page.')),
);
}
},
icon: const Icon(Icons.science_outlined),
label: const Text('Load Sample Teaching Plan (Demo)'),
),
),
const SizedBox(height: 24),
_buildOption(
context,