- Dossiers unifiés #119, pending-families enrichi, validation admin (wizards) - Front: modèles dossier_unifie / pending_family, NIR, auth - Migrations dossier_famille, scripts de test API - Résolution conflits: parents.*, docs tickets, auth_service, nir_utils Made-with: Cursor
33 lines
990 B
Dart
33 lines
990 B
Dart
import 'package:flutter/material.dart';
|
||
import 'validation_modal_theme.dart';
|
||
|
||
/// Affiche une confirmation avant d’appeler l’API de validation du dossier.
|
||
/// Retourne `true` si l’utilisateur confirme.
|
||
Future<bool> showValidationValiderConfirmDialog(
|
||
BuildContext context, {
|
||
required String body,
|
||
}) async {
|
||
final result = await showDialog<bool>(
|
||
context: context,
|
||
barrierDismissible: false,
|
||
builder: (dialogContext) {
|
||
return AlertDialog(
|
||
title: const Text('Confirmer la validation'),
|
||
content: Text(body),
|
||
actions: [
|
||
TextButton(
|
||
onPressed: () => Navigator.of(dialogContext).pop(false),
|
||
child: const Text('Annuler'),
|
||
),
|
||
ElevatedButton(
|
||
style: ValidationModalTheme.primaryElevatedStyle,
|
||
onPressed: () => Navigator.of(dialogContext).pop(true),
|
||
child: const Text('Confirmer'),
|
||
),
|
||
],
|
||
);
|
||
},
|
||
);
|
||
return result == true;
|
||
}
|