import 'package:intl/intl.dart'; /// Affiche une date ISO / parseable en `dd/MM/yyyy`, avec repli sur la chaîne ou [ifEmpty]. String formatIsoDateFr(String? s, {String ifEmpty = '–'}) { if (s == null || s.trim().isEmpty) return ifEmpty; try { return DateFormat('dd/MM/yyyy').format(DateTime.parse(s.trim())); } catch (_) { return s.trim(); } }