Version propre - Dashboard enhanced
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../../../shared/theme/app_theme.dart';
|
||||
|
||||
/// Widget de section d'accueil personnalisé pour le dashboard
|
||||
///
|
||||
/// Affiche un message de bienvenue avec un gradient coloré et une icône.
|
||||
/// Conçu pour donner une impression chaleureuse et professionnelle à l'utilisateur.
|
||||
class WelcomeSectionWidget extends StatelessWidget {
|
||||
/// Titre principal affiché (par défaut "Bonjour !")
|
||||
final String title;
|
||||
|
||||
/// Sous-titre descriptif (par défaut "Voici un aperçu de votre association")
|
||||
final String subtitle;
|
||||
|
||||
/// Icône affichée à droite (par défaut Icons.dashboard)
|
||||
final IconData icon;
|
||||
|
||||
/// Couleurs du gradient (par défaut primaryColor vers primaryLight)
|
||||
final List<Color>? gradientColors;
|
||||
|
||||
const WelcomeSectionWidget({
|
||||
super.key,
|
||||
this.title = 'Bonjour !',
|
||||
this.subtitle = 'Voici un aperçu de votre association',
|
||||
this.icon = Icons.dashboard,
|
||||
this.gradientColors,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = gradientColors ?? [AppTheme.primaryColor, AppTheme.primaryLight];
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: colors,
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.9),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 60,
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: Icon(
|
||||
icon,
|
||||
color: Colors.white,
|
||||
size: 30,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user