Files
app_fideliter_client/lib/screens/welcome_screen.dart
T
2026-07-18 13:11:03 +02:00

71 lines
2.4 KiB
Dart

import 'package:flutter/material.dart';
import '../theme.dart';
import '../widgets/oauth_boutons.dart';
import 'login_screen.dart';
import 'signup_screen.dart';
/// Premier écran : le client choisit de se connecter ou de créer un compte.
class WelcomeScreen extends StatelessWidget {
const WelcomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(28),
child: Column(
children: [
const Spacer(flex: 2),
Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: AppTheme.accent.withValues(alpha: 0.12),
shape: BoxShape.circle,
),
child: const Icon(Icons.card_membership,
size: 56, color: AppTheme.accent),
),
const SizedBox(height: 28),
const Text(
'Votre carte de fidélité',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 26, fontWeight: FontWeight.w800),
),
const SizedBox(height: 10),
const Text(
'Cumulez des points à chaque achat et profitez de récompenses.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 15, color: AppTheme.grisTexte),
),
const Spacer(flex: 3),
FilledButton(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(builder: (_) => const SignupScreen()),
),
child: const Text('Créer un compte'),
),
const SizedBox(height: 12),
OutlinedButton(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(builder: (_) => const LoginScreen()),
),
style: OutlinedButton.styleFrom(
minimumSize: const Size.fromHeight(52),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(14)),
),
child: const Text('J\'ai déjà un compte'),
),
const SizedBox(height: 16),
const OAuthBoutons(),
const SizedBox(height: 12),
],
),
),
),
);
}
}