@@ -2,80 +2,67 @@ import 'package:flutter/material.dart';
2
2
import 'package:flutter_screenutil/flutter_screenutil.dart' ;
3
3
4
4
class DeleteBadgeDialog extends StatelessWidget {
5
- const DeleteBadgeDialog ({
6
- super .key,
7
- });
5
+ const DeleteBadgeDialog ({super .key});
8
6
9
7
@override
10
8
Widget build (BuildContext context) {
11
9
return Dialog (
10
+ insetPadding: EdgeInsets .symmetric (horizontal: 24. w),
12
11
shape: RoundedRectangleBorder (
13
- borderRadius: BorderRadius .circular (5 . r),
12
+ borderRadius: BorderRadius .circular (12 . r),
14
13
),
15
- child: Container (
16
- height: 110. h,
17
- width: 300. w,
18
- decoration: BoxDecoration (
19
- color: Colors .white,
20
- borderRadius: BorderRadius .circular (5. r),
21
- ),
14
+ child: Padding (
15
+ padding: EdgeInsets .all (20. w),
22
16
child: Column (
17
+ mainAxisSize: MainAxisSize .min,
18
+ crossAxisAlignment: CrossAxisAlignment .start,
23
19
children: [
24
- SizedBox (
25
- height: 10. h,
26
- ),
27
20
Row (
28
21
children: [
29
- SizedBox (
30
- width: 20 ,
31
- ),
32
- Icon (Icons .delete, color: Colors .black),
33
- SizedBox (
34
- width: 10 ,
35
- ),
36
- Text (
37
- 'Delete' ,
38
- style: TextStyle (
39
- fontSize: 16. sp,
40
- fontWeight: FontWeight .w500,
22
+ Icon (Icons .delete_outline, color: Colors .red),
23
+ SizedBox (width: 10. w),
24
+ Expanded (
25
+ child: Text (
26
+ 'Delete Badge' ,
27
+ style: TextStyle (
28
+ fontSize: 18. sp,
29
+ fontWeight: FontWeight .w600,
30
+ ),
41
31
),
42
32
),
43
33
],
44
34
),
45
- SizedBox (
46
- height: 7. h,
47
- ),
48
- Row (
49
- children: [
50
- SizedBox (
51
- width: 20 ,
52
- ),
53
- Text ('Are you sure want to delete this badge?' ,
54
- style: TextStyle (fontSize: 14. sp)),
55
- ],
56
- ),
57
- SizedBox (
58
- height: 10. h,
35
+ SizedBox (height: 16. h),
36
+ Text (
37
+ 'Are you sure you want to delete this badge? This action cannot be undone.' ,
38
+ style: TextStyle (fontSize: 15. sp),
59
39
),
40
+ SizedBox (height: 24. h),
60
41
Row (
61
42
mainAxisAlignment: MainAxisAlignment .end,
62
43
children: [
63
44
TextButton (
64
- onPressed: () {
65
- Navigator .of (context).pop (false );
66
- },
67
- child: const Text (
45
+ onPressed: () => Navigator .of (context).pop (false ),
46
+ child: Text (
68
47
'Cancel' ,
69
- style: TextStyle (color: Colors .red),
48
+ style: TextStyle (
49
+ color: Theme .of (context).colorScheme.secondary,
50
+ fontSize: 14. sp,
51
+ ),
70
52
),
71
53
),
72
- TextButton (
73
- onPressed: () {
74
- Navigator .of (context).pop (true );
75
- },
76
- child: const Text (
77
- 'OK' ,
78
- style: TextStyle (color: Colors .red),
54
+ SizedBox (width: 8. w),
55
+ ElevatedButton (
56
+ style: ElevatedButton .styleFrom (
57
+ backgroundColor: Colors .red,
58
+ padding:
59
+ EdgeInsets .symmetric (horizontal: 20. w, vertical: 10. h),
60
+ minimumSize: Size (64. w, 36. h),
61
+ ),
62
+ onPressed: () => Navigator .of (context).pop (true ),
63
+ child: Text (
64
+ 'Delete' ,
65
+ style: TextStyle (fontSize: 14. sp, color: Colors .white),
79
66
),
80
67
),
81
68
],
0 commit comments