Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
confirmation_dialog.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2
3Future<bool?> showConfirmationDialog({
4 required BuildContext context,
5 String title = 'Confirm Cancellation',
6 String message = 'Are you sure you want to cancel this collection?',
7}) {
8 return showDialog<bool>(
9 context: context,
10 barrierDismissible: false,
11 builder: (BuildContext context) {
12 return AlertDialog(
13 shape: RoundedRectangleBorder(
14 borderRadius: BorderRadius.circular(15),
15 ),
17 content: Text(message),
18 actions: [
19 TextButton(
20 onPressed: () => Navigator.of(context).pop(false),
21 child: const Text(
22 'NO',
23 style: TextStyle(color: Colors.grey),
24 ),
25 ),
26 TextButton(
27 onPressed: () => Navigator.of(context).pop(true),
28 child: const Text(
29 'YES',
30 style: TextStyle(color: Colors.red),
31 ),
32 ),
33 ],
34 );
35 },
36 );
37}
Future< bool?> showConfirmationDialog({ required BuildContext context, String title='Confirm Cancellation', String message='Are you sure you want to cancel this collection?', })
final Widget child
class Partner String
final Color color
Definition failures.dart:1
final String message
Definition failures.dart:0
final VoidCallback onPressed
final String title
style Text( '${ 'scheduling.reference'.tr()}:${collection.internalCode}', style:Theme.of(context).textTheme.bodySmall,)