Your commit message here
This commit is contained in:
@@ -15,17 +15,31 @@ class TipCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
final theme = Theme.of(context);
|
||||
final isDark = theme.brightness == Brightness.dark;
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
final tip = _getTipForPhase(phase, isMarried);
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
<<<<<<< HEAD
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColors.charcoal.withOpacity(0.05),
|
||||
=======
|
||||
color: theme.cardColor,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: isDark ? Border.all(color: Colors.white.withOpacity(0.05)) : null,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: (isDark ? Colors.black : AppColors.charcoal).withOpacity(0.05),
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -38,7 +52,11 @@ class TipCard extends StatelessWidget {
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
<<<<<<< HEAD
|
||||
color: AppColors.sageGreen.withOpacity(0.15),
|
||||
=======
|
||||
color: AppColors.sageGreen.withOpacity(isDark ? 0.2 : 0.15),
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: const Icon(
|
||||
@@ -54,21 +72,57 @@ class TipCard extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'Today\'s Tip',
|
||||
<<<<<<< HEAD
|
||||
style: GoogleFonts.outfit(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.charcoal,
|
||||
=======
|
||||
style: theme.textTheme.titleMedium?.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
tip,
|
||||
<<<<<<< HEAD
|
||||
style: GoogleFonts.outfit(
|
||||
fontSize: 13,
|
||||
color: AppColors.warmGray,
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
=======
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: 13,
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
InkWell(
|
||||
onTap: () => _showDetailedInsights(context),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Learn More',
|
||||
style: GoogleFonts.outfit(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.sageGreen,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 10,
|
||||
color: AppColors.sageGreen,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -77,6 +131,7 @@ class TipCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
String _getTipForPhase(CyclePhase phase, bool isMarried) {
|
||||
switch (phase) {
|
||||
case CyclePhase.menstrual:
|
||||
@@ -90,6 +145,123 @@ class TipCard extends StatelessWidget {
|
||||
return 'You may feel more social and confident during this phase. It\'s a great time for important conversations and presentations.';
|
||||
case CyclePhase.luteal:
|
||||
return 'As you enter the luteal phase, focus on nourishing foods, adequate sleep, and stress management. Be gentle with yourself.';
|
||||
=======
|
||||
void _showDetailedInsights(BuildContext context) {
|
||||
final details = _getDetailsForPhase(phase);
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||
title: Column(
|
||||
children: [
|
||||
Text(
|
||||
'Phase Insight: ${phase.label}',
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.outfit(fontWeight: FontWeight.w600),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
phase.emoji,
|
||||
style: const TextStyle(fontSize: 32),
|
||||
),
|
||||
],
|
||||
),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildDetailSection('Nutrition', details['nutrition']!, Icons.restaurant),
|
||||
const SizedBox(height: 16),
|
||||
_buildDetailSection('Movement', details['movement']!, Icons.fitness_center),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Note: While these are general trends, your body is unique. Always listen to your own energy levels.',
|
||||
style: GoogleFonts.outfit(
|
||||
fontSize: 11,
|
||||
fontStyle: FontStyle.italic,
|
||||
color: AppColors.warmGray,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text('Got it', style: GoogleFonts.outfit(color: AppColors.sageGreen)),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDetailSection(String title, String content, IconData icon) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(icon, size: 16, color: AppColors.sageGreen),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
title,
|
||||
style: GoogleFonts.outfit(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
content,
|
||||
style: GoogleFonts.outfit(
|
||||
fontSize: 13,
|
||||
color: AppColors.charcoal,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
String _getTipForPhase(CyclePhase phase, bool isMarried) {
|
||||
switch (phase) {
|
||||
case CyclePhase.menstrual:
|
||||
return 'Focus on iron-rich foods and gentle rest. Your body is working hard; honor it with hydration and Vitamin C.';
|
||||
case CyclePhase.follicular:
|
||||
return 'Energy is rising! Support your cycle with cruciferous vegetables and lean protein as you transition to more active movement.';
|
||||
case CyclePhase.ovulation:
|
||||
if (isMarried) {
|
||||
return 'Peak energy and connection. Focus on healthy fats for hormonal support and prioritize quality time with your spouse.';
|
||||
}
|
||||
return 'Peak confidence and social energy. Support your peak energy with complex carbs and social engagement.';
|
||||
case CyclePhase.luteal:
|
||||
return 'Nourish your nervous system with magnesium-rich foods and steady mobility. Transition to restorative self-care.';
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> _getDetailsForPhase(CyclePhase phase) {
|
||||
switch (phase) {
|
||||
case CyclePhase.menstrual:
|
||||
return {
|
||||
'nutrition': 'Incorporate leafy greens, red meat or lentils for iron. Pair with citrus for better absorption.',
|
||||
'movement': 'Gentle walking, restorative yoga, or just deep breathing. Avoid high-intensity stress.',
|
||||
};
|
||||
case CyclePhase.follicular:
|
||||
return {
|
||||
'nutrition': 'Broccoli, cauliflower, and fermented foods help balance rising estrogen. Focus on lean proteins.',
|
||||
'movement': 'Strength training and steady cardio. Your body is primed for building and renewal.',
|
||||
};
|
||||
case CyclePhase.ovulation:
|
||||
return {
|
||||
'nutrition': 'Avocados, nuts, and seeds provide healthy fats for peak hormonal health. Keep hydration high.',
|
||||
'movement': 'Highest intensity workouts, HIIT, or group sports. You have peak stamina and strength right now.',
|
||||
};
|
||||
case CyclePhase.luteal:
|
||||
return {
|
||||
'nutrition': 'Dark chocolate (70%+), pumpkin seeds, and bananas for magnesium to help with cramps.',
|
||||
'movement': 'Pilates, steady-state swimming, or hiking. Focus on persistence rather than peak intensity.',
|
||||
};
|
||||
>>>>>>> 6742220 (Your commit message here)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user