feat(#212): état vide Cartes — ours endormi + message
Remplace le texte sec par l’illustration aquarelle et le message soft ; CTA Ajouter une carte inchangé. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 158 KiB |
@@ -442,17 +442,7 @@ class _CartesFeedState extends State<CartesFeed> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (_items.isEmpty) {
|
if (_items.isEmpty) {
|
||||||
return Center(
|
return const _CartesEmptyState();
|
||||||
child: Text(
|
|
||||||
'Aucune bulle pour le moment.\nLa file d’attention est vide — c’est normal.',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: GoogleFonts.merriweather(
|
|
||||||
fontSize: 13,
|
|
||||||
color: QuotidienTheme.muted,
|
|
||||||
height: 1.4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NotificationListener<ScrollMetricsNotification>(
|
return NotificationListener<ScrollMetricsNotification>(
|
||||||
@@ -1191,6 +1181,65 @@ class _RefuseDialogState extends State<_RefuseDialog> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// État vide de la file d'attention — ours endormi (#212).
|
||||||
|
class _CartesEmptyState extends StatelessWidget {
|
||||||
|
const _CartesEmptyState();
|
||||||
|
|
||||||
|
static const _asset = 'assets/images/ours_endormi.png';
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return LayoutBuilder(
|
||||||
|
builder: (context, constraints) {
|
||||||
|
final maxW = constraints.maxWidth;
|
||||||
|
// ~160–200 px, réduit si colonne étroite.
|
||||||
|
final imgW =
|
||||||
|
maxW.isFinite ? maxW.clamp(100.0, 200.0) : 180.0;
|
||||||
|
return Center(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(maxWidth: maxW),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
_asset,
|
||||||
|
width: imgW,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
filterQuality: FilterQuality.high,
|
||||||
|
semanticLabel: 'Ours endormi',
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Text(
|
||||||
|
'File d’attention au repos.',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: GoogleFonts.merienda(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: QuotidienTheme.ink,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
Text(
|
||||||
|
'Pas de bulle en attente — on respire.',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: GoogleFonts.merriweather(
|
||||||
|
fontSize: 13,
|
||||||
|
color: QuotidienTheme.muted,
|
||||||
|
height: 1.4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// CTA « Ajouter une carte » — pilule aquarelle en bas du feed (#175).
|
/// CTA « Ajouter une carte » — pilule aquarelle en bas du feed (#175).
|
||||||
class _AjouterCarteCta extends StatelessWidget {
|
class _AjouterCarteCta extends StatelessWidget {
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
|
|||||||
Reference in New Issue
Block a user