mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-05 04:22:55 +00:00
main, fix
This commit is contained in:
+74
-43
@@ -16,51 +16,82 @@ class OnboardingHowItWorksScreen extends ConsumerWidget {
|
||||
|
||||
return AppScaffold(
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
'How It Works',
|
||||
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
child: Column(
|
||||
children: [
|
||||
// Progress indicator and back button
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
),
|
||||
Expanded(
|
||||
child: LinearProgressIndicator(
|
||||
value: 2 / 3, // Step 2 of 3
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 48), // Balance the back button
|
||||
],
|
||||
),
|
||||
),
|
||||
// Scrollable content
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'How It Works',
|
||||
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const _StepCard(
|
||||
number: 1,
|
||||
title: 'Create Your Bucket List',
|
||||
description: 'Add between 1 and 20 goals you want to achieve. Each goal can have a description, location, and image.',
|
||||
icon: Icons.edit_note,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const _StepCard(
|
||||
number: 2,
|
||||
title: 'Finalize Your List',
|
||||
description: 'Once you\'re happy with your goals, confirm your bucket list. This action cannot be undone.',
|
||||
icon: Icons.lock,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const _StepCard(
|
||||
number: 3,
|
||||
title: 'Start Your 1356-Day Journey',
|
||||
description: 'The countdown begins immediately. Track your progress and make every day count.',
|
||||
icon: Icons.timer,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
PrimaryButton(
|
||||
onPressed: () {
|
||||
controller.completeStep('how_it_works');
|
||||
context.push('/onboarding/motivation');
|
||||
},
|
||||
text: 'Continue',
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
const _StepCard(
|
||||
number: 1,
|
||||
title: 'Create Your Bucket List',
|
||||
description: 'Add between 1 and 20 goals you want to achieve. Each goal can have a description, location, and image.',
|
||||
icon: Icons.edit_note,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const _StepCard(
|
||||
number: 2,
|
||||
title: 'Finalize Your List',
|
||||
description: 'Once you\'re happy with your goals, confirm your bucket list. This action cannot be undone.',
|
||||
icon: Icons.lock,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const _StepCard(
|
||||
number: 3,
|
||||
title: 'Start Your 1356-Day Journey',
|
||||
description: 'The countdown begins immediately. Track your progress and make every day count.',
|
||||
icon: Icons.timer,
|
||||
),
|
||||
const Spacer(),
|
||||
PrimaryButton(
|
||||
onPressed: () {
|
||||
controller.completeStep('how_it_works');
|
||||
context.push('/onboarding/motivation');
|
||||
},
|
||||
text: 'Continue',
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -16,73 +16,105 @@ class OnboardingIntroScreen extends ConsumerWidget {
|
||||
|
||||
return AppScaffold(
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const SizedBox(height: 48),
|
||||
const Icon(
|
||||
Icons.timer_outlined,
|
||||
size: 100,
|
||||
color: null,
|
||||
child: Column(
|
||||
children: [
|
||||
// Progress indicator and back button
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
// Can't go back from intro, go to auth choice
|
||||
context.push('/auth-choice');
|
||||
},
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
),
|
||||
Expanded(
|
||||
child: LinearProgressIndicator(
|
||||
value: 1 / 3, // Step 1 of 3
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 48), // Balance the back button
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
Text(
|
||||
'Welcome to LifeTimer',
|
||||
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
// Scrollable content
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const SizedBox(height: 16),
|
||||
const Icon(
|
||||
Icons.timer_outlined,
|
||||
size: 64,
|
||||
color: null,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
'Welcome to LifeTimer',
|
||||
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'Your 1356-day journey starts here.\nCreate your bucket list and begin your countdown.',
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
|
||||
height: 1.5,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
const _FeatureCard(
|
||||
icon: Icons.flag,
|
||||
title: 'Set Your Goals',
|
||||
description: 'Create a bucket list of 1-20 meaningful goals',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const _FeatureCard(
|
||||
icon: Icons.lock_clock,
|
||||
title: 'Fixed Timeline',
|
||||
description: '1356 days to achieve everything - no extensions',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const _FeatureCard(
|
||||
icon: Icons.trending_up,
|
||||
title: 'Track Progress',
|
||||
description: 'Watch yourself grow day by day',
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
PrimaryButton(
|
||||
onPressed: () {
|
||||
controller.completeStep('intro');
|
||||
context.push('/onboarding/how-it-works');
|
||||
},
|
||||
text: 'Get Started',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await controller.skipOnboarding();
|
||||
if (context.mounted) {
|
||||
context.push('/home');
|
||||
}
|
||||
},
|
||||
child: const Text('Skip onboarding'),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Your 1356-day journey starts here.\nCreate your bucket list and begin your countdown.',
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
|
||||
height: 1.5,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 48),
|
||||
const _FeatureCard(
|
||||
icon: Icons.flag,
|
||||
title: 'Set Your Goals',
|
||||
description: 'Create a bucket list of 1-20 meaningful goals',
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const _FeatureCard(
|
||||
icon: Icons.lock_clock,
|
||||
title: 'Fixed Timeline',
|
||||
description: '1356 days to achieve everything - no extensions',
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const _FeatureCard(
|
||||
icon: Icons.trending_up,
|
||||
title: 'Track Progress',
|
||||
description: 'Watch yourself grow day by day',
|
||||
),
|
||||
const Spacer(),
|
||||
PrimaryButton(
|
||||
onPressed: () {
|
||||
controller.completeStep('intro');
|
||||
context.push('/onboarding/how-it-works');
|
||||
},
|
||||
text: 'Get Started',
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await controller.skipOnboarding();
|
||||
if (context.mounted) {
|
||||
context.push('/home');
|
||||
}
|
||||
},
|
||||
child: const Text('Skip onboarding'),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -105,10 +137,10 @@ class _FeatureCard extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.3),
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.2),
|
||||
color: Theme.of(context).colorScheme.outline.withOpacity(0.2),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
|
||||
@@ -16,69 +16,100 @@ class OnboardingMotivationScreen extends ConsumerWidget {
|
||||
|
||||
return AppScaffold(
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const SizedBox(height: 24),
|
||||
const Icon(
|
||||
Icons.psychology_outlined,
|
||||
size: 80,
|
||||
color: Colors.amber,
|
||||
child: Column(
|
||||
children: [
|
||||
// Progress indicator and back button
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
),
|
||||
Expanded(
|
||||
child: LinearProgressIndicator(
|
||||
value: 3 / 3, // Step 3 of 3 (complete)
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 48), // Balance the back button
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
'Your Time is Now',
|
||||
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
// Scrollable content
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
const Icon(
|
||||
Icons.psychology_outlined,
|
||||
size: 64,
|
||||
color: Colors.amber,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Your Time is Now',
|
||||
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'1356 days is approximately 3 years and 8 months.\n\n'
|
||||
'That\'s enough time to transform your life, learn new skills, '
|
||||
'build meaningful relationships, and achieve your biggest dreams.\n\n'
|
||||
'Every day counts. Every step matters. Your journey begins now.',
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
|
||||
height: 1.5,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const _MotivationCard(
|
||||
icon: Icons.trending_up,
|
||||
title: 'Track Progress',
|
||||
description: 'Watch yourself grow as you complete goals and milestones.',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const _MotivationCard(
|
||||
icon: Icons.people,
|
||||
title: 'Join Community',
|
||||
description: 'Connect with others on similar journeys (optional).',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const _MotivationCard(
|
||||
icon: Icons.celebration,
|
||||
title: 'Celebrate Wins',
|
||||
description: 'Every achievement is worth celebrating.',
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
PrimaryButton(
|
||||
onPressed: () async {
|
||||
controller.completeStep('motivation');
|
||||
await controller.completeOnboarding();
|
||||
if (context.mounted) {
|
||||
context.push('/profile-setup');
|
||||
}
|
||||
},
|
||||
text: 'Get Started',
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'1356 days is approximately 3 years and 8 months.\n\n'
|
||||
'That\'s enough time to transform your life, learn new skills, '
|
||||
'build meaningful relationships, and achieve your biggest dreams.\n\n'
|
||||
'Every day counts. Every step matters. Your journey begins now.',
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
|
||||
height: 1.5,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
const _MotivationCard(
|
||||
icon: Icons.trending_up,
|
||||
title: 'Track Progress',
|
||||
description: 'Watch yourself grow as you complete goals and milestones.',
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const _MotivationCard(
|
||||
icon: Icons.people,
|
||||
title: 'Join Community',
|
||||
description: 'Connect with others on similar journeys (optional).',
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const _MotivationCard(
|
||||
icon: Icons.celebration,
|
||||
title: 'Celebrate Wins',
|
||||
description: 'Every achievement is worth celebrating.',
|
||||
),
|
||||
const Spacer(),
|
||||
PrimaryButton(
|
||||
onPressed: () async {
|
||||
controller.completeStep('motivation');
|
||||
await controller.completeOnboarding();
|
||||
if (context.mounted) {
|
||||
context.push('/profile/create');
|
||||
}
|
||||
},
|
||||
text: 'Get Started',
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -101,10 +132,10 @@ class _MotivationCard extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.3),
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.2),
|
||||
color: Theme.of(context).colorScheme.outline.withOpacity(0.2),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
|
||||
Reference in New Issue
Block a user