Resolve all lints and deprecation warnings

This commit is contained in:
2026-01-09 10:04:51 -06:00
parent 512577b092
commit a799e9cf59
56 changed files with 2819 additions and 3159 deletions

View File

@@ -8,6 +8,7 @@ import '../../providers/user_provider.dart';
import '../../theme/app_theme.dart';
import '../../services/bible_xml_parser.dart';
import '../../services/mock_data_service.dart';
import '../../services/notification_service.dart';
class HusbandDevotionalScreen extends ConsumerStatefulWidget {
const HusbandDevotionalScreen({super.key});
@@ -190,11 +191,11 @@ class _HusbandDevotionalScreenState
// Trigger notification for new teaching plans
if (existingPlan == null) {
NotificationService().showTeachingPlanNotification(
teacherName: user.name ?? 'Husband',
teacherName: user.name,
);
}
if (mounted) Navigator.pop(context);
if (context.mounted) Navigator.pop(context);
},
child: const Text('Save'),
),
@@ -283,7 +284,7 @@ class _HusbandDevotionalScreenState
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: Colors.grey.withOpacity(0.2)),
border: Border.all(color: Colors.grey.withValues(alpha: 0.2)),
),
child: Column(
children: [
@@ -314,7 +315,7 @@ class _HusbandDevotionalScreenState
background: Container(
alignment: Alignment.centerRight,
padding: const EdgeInsets.only(right: 20),
color: Colors.red.withOpacity(0.8),
color: Colors.red.withValues(alpha: 0.8),
child: const Icon(Icons.delete, color: Colors.white),
),
onDismissed: (_) => _deletePlan(plan),
@@ -517,14 +518,14 @@ class _HusbandDevotionalScreenState
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
AppColors.lavender.withOpacity(0.15),
AppColors.blushPink.withOpacity(0.15),
AppColors.lavender.withValues(alpha: 0.15),
AppColors.blushPink.withValues(alpha: 0.15),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppColors.lavender.withOpacity(0.3)),
border: Border.all(color: AppColors.lavender.withValues(alpha: 0.3)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -623,12 +624,12 @@ class _HusbandDevotionalScreenState
width: double.infinity,
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.5),
color: Colors.white.withValues(alpha: 0.5),
borderRadius: BorderRadius.circular(12),
),
child: Column(
children: [
Icon(Icons.favorite_border,
const Icon(Icons.favorite_border,
color: AppColors.warmGray, size: 32),
const SizedBox(height: 8),
Text(
@@ -642,7 +643,7 @@ class _HusbandDevotionalScreenState
'Check back later or encourage her to share.',
style: GoogleFonts.outfit(
fontSize: 12,
color: AppColors.warmGray.withOpacity(0.8),
color: AppColors.warmGray.withValues(alpha: 0.8),
),
),
],
@@ -660,8 +661,8 @@ class _HusbandDevotionalScreenState
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Row(
children: const [
title: const Row(
children: [
Icon(Icons.link, color: AppColors.navyBlue),
SizedBox(width: 8),
Text('Connect with Wife'),
@@ -723,12 +724,14 @@ class _HusbandDevotionalScreenState
.updateProfile(updatedProfile);
}
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Connected with wife! 💑'),
backgroundColor: AppColors.sageGreen,
),
);
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Connected with wife! 💑'),
backgroundColor: AppColors.sageGreen,
),
);
}
}
},
style: ElevatedButton.styleFrom(