Phase 1 du MVP : schéma SQLite porté depuis le prototype web, seed des règles/récompenses, flux d'onboarding en 4 étapes et écran d'accueil minimal. Co-authored-by: Cursor <cursoragent@cursor.com>
77 lines
2.0 KiB
Dart
77 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../widgets/onboarding_scaffold.dart';
|
|
|
|
class WelcomeStep extends StatelessWidget {
|
|
const WelcomeStep({super.key, required this.onNext});
|
|
|
|
final VoidCallback onNext;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return OnboardingScaffold(
|
|
step: 1,
|
|
title: 'Bons Points',
|
|
subtitle: 'Simple, privé, 100 % sur votre téléphone',
|
|
child: Card(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
const Text('⭐', style: TextStyle(fontSize: 56)),
|
|
const SizedBox(height: 20),
|
|
_FeatureRow(
|
|
icon: Icons.phone_android,
|
|
text: 'Aucun compte, aucun cloud',
|
|
),
|
|
const SizedBox(height: 12),
|
|
_FeatureRow(
|
|
icon: Icons.wifi_off,
|
|
text: 'Fonctionne hors ligne',
|
|
),
|
|
const SizedBox(height: 12),
|
|
_FeatureRow(
|
|
icon: Icons.family_restroom,
|
|
text: 'Bons points pour toute la famille',
|
|
),
|
|
const SizedBox(height: 12),
|
|
_FeatureRow(
|
|
icon: Icons.lock_outline,
|
|
text: 'Espace parent protégé par PIN',
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
bottom: FilledButton(
|
|
onPressed: onNext,
|
|
child: const Text('Commencer'),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _FeatureRow extends StatelessWidget {
|
|
const _FeatureRow({required this.icon, required this.text});
|
|
|
|
final IconData icon;
|
|
final String text;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
children: [
|
|
Icon(icon, color: const Color(0xFF667EEA)),
|
|
const SizedBox(width: 12),
|
|
Expanded(
|
|
child: Text(
|
|
text,
|
|
style: Theme.of(context).textTheme.bodyLarge,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|