refactor(#173): widget Carte (extensible par défaut) + fix bandeau

Renomme NineSlice* en Carte. Le bandeau couple s’étire en
horizontal seulement pour garder les bouts demi-cercle.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-01 17:10:41 +02:00
co-authored by Cursor
parent 2c461abc82
commit 5eb0f13e75
4 changed files with 258 additions and 275 deletions
@@ -3,7 +3,7 @@ import 'package:google_fonts/google_fonts.dart';
import 'package:p_tits_pas/models/couple_garde.dart';
import 'package:p_tits_pas/services/api/api_config.dart';
import 'package:p_tits_pas/widgets/common/auth_network_image.dart';
import 'package:p_tits_pas/widgets/quotidien/nine_slice_asset.dart';
import 'package:p_tits_pas/widgets/quotidien/carte.dart';
import 'package:p_tits_pas/widgets/quotidien/quotidien_theme.dart';
/// Rôle qui consulte le bandeau : côté parent (enfant | nounou) ou côté AM
@@ -175,7 +175,7 @@ class _CoupleCard extends StatelessWidget {
);
}
return NineSliceAsset.bandeau(
return Carte.bandeau(
assetPath: QuotidienTheme
.bandeauColors[colorIndex % QuotidienTheme.bandeauColors.length],
height: 90,
@@ -309,7 +309,7 @@ class _CoupleBandeauSkeleton extends StatelessWidget {
Colors.white.withValues(alpha: 0.5),
BlendMode.lighten,
),
child: NineSliceAsset.bandeau(
child: Carte.bandeau(
assetPath: QuotidienTheme.bandeauLime,
height: 90,
child: const Center(
@@ -329,7 +329,7 @@ class _CoupleBandeauEmpty extends StatelessWidget {
@override
Widget build(BuildContext context) {
return NineSliceAsset.bandeau(
return Carte.bandeau(
assetPath: QuotidienTheme.bandeauLime,
height: 90,
padding: const EdgeInsets.symmetric(horizontal: 24),
@@ -365,7 +365,7 @@ class _CoupleBandeauError extends StatelessWidget {
QuotidienTheme.coral.withValues(alpha: 0.3),
BlendMode.srcATop,
),
child: NineSliceAsset.bandeau(
child: Carte.bandeau(
assetPath: QuotidienTheme.bandeauLime,
height: 90,
padding: const EdgeInsets.symmetric(horizontal: 24),