Resolve all lints and deprecation warnings
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../husband/learn_article_screen.dart';
|
||||
import '../husband/husband_learn_articles_screen.dart';
|
||||
|
||||
class WifeLearnScreen extends StatelessWidget {
|
||||
const WifeLearnScreen({super.key});
|
||||
@@ -23,7 +23,7 @@ class WifeLearnScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildSection(context, 'Understanding My Cycle', [
|
||||
_buildSection(context, 'Understanding My Cycle', const [
|
||||
_LearnItem(
|
||||
icon: Icons.loop,
|
||||
title: 'The 4 Phases',
|
||||
@@ -34,11 +34,12 @@ class WifeLearnScreen extends StatelessWidget {
|
||||
icon: Icons.psychology_outlined,
|
||||
title: 'Mood & Hormones',
|
||||
subtitle: 'Why I feel different each week',
|
||||
articleId: 'wife_mood_changes', // Reusing similar concept, maybe new article
|
||||
articleId:
|
||||
'wife_mood_changes', // Reusing similar concept, maybe new article
|
||||
),
|
||||
]),
|
||||
const SizedBox(height: 24),
|
||||
_buildSection(context, 'Disease Prevention', [
|
||||
_buildSection(context, 'Disease Prevention', const [
|
||||
_LearnItem(
|
||||
icon: Icons.health_and_safety_outlined,
|
||||
title: 'Preventing Infections',
|
||||
@@ -53,7 +54,7 @@ class WifeLearnScreen extends StatelessWidget {
|
||||
),
|
||||
]),
|
||||
const SizedBox(height: 24),
|
||||
_buildSection(context, 'Partnership', [
|
||||
_buildSection(context, 'Partnership', const [
|
||||
_LearnItem(
|
||||
icon: Icons.favorite_border,
|
||||
title: 'Communication',
|
||||
@@ -73,7 +74,8 @@ class WifeLearnScreen extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSection(BuildContext context, String title, List<_LearnItem> items) {
|
||||
Widget _buildSection(
|
||||
BuildContext context, String title, List<_LearnItem> items) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -92,7 +94,10 @@ class WifeLearnScreen extends StatelessWidget {
|
||||
color: Theme.of(context).cardTheme.color,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).colorScheme.outline.withOpacity(0.05)),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline
|
||||
.withValues(alpha: 0.05)),
|
||||
),
|
||||
child: Column(
|
||||
children: items
|
||||
@@ -101,7 +106,10 @@ class WifeLearnScreen extends StatelessWidget {
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.2),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primaryContainer
|
||||
.withValues(alpha: 0.2),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Icon(
|
||||
@@ -133,7 +141,9 @@ class WifeLearnScreen extends StatelessWidget {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => LearnArticleScreen(articleId: item.articleId),
|
||||
builder: (context) =>
|
||||
CombinedLearnArticleDetailScreen(
|
||||
articleId: item.articleId),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -158,4 +168,4 @@ class _LearnItem {
|
||||
required this.subtitle,
|
||||
required this.articleId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user