diff --git a/frontend/lib/widgets/quotidien/couple_selector_bandeau.dart b/frontend/lib/widgets/quotidien/couple_selector_bandeau.dart index 572c237..b34aa00 100644 --- a/frontend/lib/widgets/quotidien/couple_selector_bandeau.dart +++ b/frontend/lib/widgets/quotidien/couple_selector_bandeau.dart @@ -64,6 +64,7 @@ class CoupleSelectorBandeau extends StatelessWidget { mode: mode, couple: selected, showChevron: multi, + colorIndex: couples.indexOf(selected), ); if (!multi) return card; @@ -102,6 +103,7 @@ class CoupleSelectorBandeau extends StatelessWidget { showChevron: false, selected: false, isMenuItem: true, + colorIndex: couples.indexOf(c), ), ), ), @@ -120,6 +122,7 @@ class _CoupleCard extends StatelessWidget { final bool showChevron; final bool selected; final bool isMenuItem; + final int colorIndex; const _CoupleCard({ required this.mode, @@ -127,65 +130,71 @@ class _CoupleCard extends StatelessWidget { required this.showChevron, this.selected = true, this.isMenuItem = false, + required this.colorIndex, }); @override Widget build(BuildContext context) { - // Dans le menu, les non-sélectionnés sont un peu translucides - final opacity = (!selected && isMenuItem) ? 0.65 : 1.0; - return Container( height: 90, decoration: BoxDecoration( image: DecorationImage( - image: AssetImage(QuotidienTheme.bandeauAssetForCouple(couple.id)), + image: AssetImage(QuotidienTheme.bandeauColors[colorIndex % QuotidienTheme.bandeauColors.length]), fit: BoxFit.fill, - opacity: opacity, ), ), padding: const EdgeInsets.symmetric(horizontal: 24), child: Row( children: [ Expanded( - child: Opacity( - opacity: opacity, + child: Padding( + padding: const EdgeInsets.only(right: 12), child: _MembreTile( photoUrl: couple.enfant.photoUrl, - name: couple.enfant.displayName(fallback: 'Enfant'), + name: (couple.enfant.prenom != null && couple.enfant.prenom!.isNotEmpty) + ? couple.enfant.prenom! + : couple.enfant.displayName(fallback: 'Enfant'), fallbackIcon: Icons.child_care, ), ), ), Container( - width: 1, + width: 8, height: 44, - margin: const EdgeInsets.symmetric(horizontal: 12), - color: QuotidienTheme.ink.withValues(alpha: 0.15 * opacity), + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage(QuotidienTheme.pencilLineVerticalAsset), + fit: BoxFit.contain, + ), + ), ), Expanded( - child: Opacity( - opacity: opacity, + child: Padding( + padding: const EdgeInsets.only(left: 12), child: _MembreTile( photoUrl: couple.am.photoUrl, - name: couple.am.displayName( - fallback: mode == CoupleBandeauMode.parent - ? 'Nounou' - : 'Parent', - ), + name: (couple.am.prenom != null && couple.am.prenom!.isNotEmpty) + ? couple.am.prenom! + : couple.am.displayName( + fallback: mode == CoupleBandeauMode.parent + ? 'Nounou' + : 'Parent', + ), fallbackIcon: mode == CoupleBandeauMode.parent ? Icons.volunteer_activism : Icons.person_outline, ), ), ), - if (showChevron) - Padding( - padding: const EdgeInsets.only(left: 4), - child: Icon( - Icons.keyboard_arrow_down, - color: QuotidienTheme.ink.withValues(alpha: opacity), - ), - ), + SizedBox( + width: 28, + child: showChevron + ? const Icon( + Icons.keyboard_arrow_down, + color: QuotidienTheme.ink, + ) + : null, + ), ], ), ); @@ -208,15 +217,15 @@ class _MembreTile extends StatelessWidget { Widget build(BuildContext context) { return Row( children: [ - _Avatar(photoUrl: photoUrl, fallbackIcon: fallbackIcon, size: 48), - const SizedBox(width: 10), + _Avatar(photoUrl: photoUrl, fallbackIcon: fallbackIcon, size: 64), + const SizedBox(width: 12), Expanded( child: Text( name, maxLines: 1, overflow: TextOverflow.ellipsis, style: GoogleFonts.merienda( - fontSize: 15, + fontSize: 22, fontWeight: FontWeight.bold, color: QuotidienTheme.ink, ),