- Split behavioral inputs into two screens (Habits + Lifestyle) - Added 5 new modifiable factors: diet quality, processed food, drug use, social connection, and stress level - Updated hazard ratios for all new factors based on meta-analyses - Model version bumped to 1.1 - Simplified welcome screen with clearer value proposition - Updated tests for expanded behavioral model Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
75 lines
2.4 KiB
Dart
75 lines
2.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../theme.dart';
|
|
import 'baseline_screen.dart';
|
|
|
|
class WelcomeScreen extends StatelessWidget {
|
|
const WelcomeScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: SafeArea(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 32),
|
|
child: Column(
|
|
children: [
|
|
const Spacer(flex: 1),
|
|
// Main question - large and centered
|
|
Text(
|
|
'Simple questions.\nHonest answers.',
|
|
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
|
fontSize: 32,
|
|
height: 1.3,
|
|
),
|
|
textAlign: TextAlign.center,
|
|
),
|
|
const SizedBox(height: 40),
|
|
Text(
|
|
"What's the single biggest change I can make to live a longer, healthier life?",
|
|
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
|
fontWeight: FontWeight.w400,
|
|
color: AppColors.textSecondary,
|
|
height: 1.4,
|
|
),
|
|
textAlign: TextAlign.center,
|
|
),
|
|
const Spacer(flex: 2),
|
|
// Privacy note
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Icon(
|
|
Icons.lock_outline,
|
|
size: 16,
|
|
color: AppColors.textSecondary,
|
|
),
|
|
const SizedBox(width: 8),
|
|
Text(
|
|
'All data stays on your device',
|
|
style: Theme.of(context).textTheme.bodySmall,
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 24),
|
|
// Start button
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: ElevatedButton(
|
|
onPressed: () => _navigateToBaseline(context),
|
|
child: const Text('Start'),
|
|
),
|
|
),
|
|
const SizedBox(height: 32),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
void _navigateToBaseline(BuildContext context) {
|
|
Navigator.of(context).push(
|
|
MaterialPageRoute(builder: (_) => const BaselineScreen()),
|
|
);
|
|
}
|
|
}
|